Description: - Create a separate API function that fetches country data and handles invalid HTTP responses. Tasks: - Implement the API request using fetch. - Check response.ok. - Convert the response to JSON. - Transform the data into the internal Country type. - Throw a meaningful error if the request fails. Acceptance Criteria: - The function returns correctly typed country data. - Failed HTTP responses are handled as errors. - The API logic is separated from the UI components.