from . import RadioBrowserConfigEntry as RadioBrowserConfigEntry
from .const import DOMAIN as DOMAIN
from _typeshed import Incomplete
from homeassistant.components.media_player import MediaClass as MediaClass, MediaType as MediaType
from homeassistant.components.media_source import BrowseMediaSource as BrowseMediaSource, MediaSource as MediaSource, MediaSourceItem as MediaSourceItem, PlayMedia as PlayMedia, Unresolvable as Unresolvable
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
from homeassistant.util.location import vincenty as vincenty
from radios import RadioBrowser as RadioBrowser, Station as Station

CODEC_TO_MIMETYPE: Incomplete

async def async_get_media_source(hass: HomeAssistant) -> RadioMediaSource: ...

class RadioMediaSource(MediaSource):
    name: str
    hass: Incomplete
    entry: Incomplete
    def __init__(self, hass: HomeAssistant, entry: RadioBrowserConfigEntry) -> None: ...
    @property
    def radios(self) -> RadioBrowser: ...
    async def async_resolve_media(self, item: MediaSourceItem) -> PlayMedia: ...
    async def async_browse_media(self, item: MediaSourceItem) -> BrowseMediaSource: ...
    @callback
    @staticmethod
    def _async_get_station_mime_type(station: Station) -> str | None: ...
    @callback
    def _async_build_stations(self, radios: RadioBrowser, stations: list[Station]) -> list[BrowseMediaSource]: ...
    async def _async_build_by_country(self, radios: RadioBrowser, item: MediaSourceItem) -> list[BrowseMediaSource]: ...
    async def _async_build_by_language(self, radios: RadioBrowser, item: MediaSourceItem) -> list[BrowseMediaSource]: ...
    async def _async_build_popular(self, radios: RadioBrowser, item: MediaSourceItem) -> list[BrowseMediaSource]: ...
    async def _async_build_by_tag(self, radios: RadioBrowser, item: MediaSourceItem) -> list[BrowseMediaSource]: ...
    def _filter_local_stations(self, stations: list[Station], latitude: float, longitude: float) -> list[Station]: ...
    async def _async_build_local(self, radios: RadioBrowser, item: MediaSourceItem) -> list[BrowseMediaSource]: ...
