from .const import AUTH_SCHEMA_VERSION as AUTH_SCHEMA_VERSION, CONF_TOKEN as CONF_TOKEN, DOMAIN as DOMAIN, HASSIO_DISCOVERY_SCHEMA_VERSION as HASSIO_DISCOVERY_SCHEMA_VERSION, LOGGER as LOGGER
from _typeshed import Incomplete
from collections.abc import Mapping
from homeassistant.config_entries import ConfigEntryState as ConfigEntryState, ConfigFlow as ConfigFlow, ConfigFlowResult as ConfigFlowResult, SOURCE_REAUTH as SOURCE_REAUTH
from homeassistant.const import CONF_URL as CONF_URL
from homeassistant.core import HomeAssistant as HomeAssistant
from homeassistant.helpers import aiohttp_client as aiohttp_client
from homeassistant.helpers.config_entry_oauth2_flow import _encode_jwt as _encode_jwt, async_get_redirect_uri as async_get_redirect_uri
from homeassistant.helpers.service_info.hassio import HassioServiceInfo as HassioServiceInfo
from homeassistant.helpers.service_info.zeroconf import ZeroconfServiceInfo as ZeroconfServiceInfo
from music_assistant_models.api import ServerInfoMessage
from typing import Any

DEFAULT_TITLE: str
DEFAULT_URL: str
STEP_USER_SCHEMA: Incomplete
STEP_AUTH_TOKEN_SCHEMA: Incomplete

def _parse_zeroconf_server_info(properties: dict[str, str]) -> ServerInfoMessage: ...
async def _get_server_info(hass: HomeAssistant, url: str) -> ServerInfoMessage: ...
async def _test_connection(hass: HomeAssistant, url: str, token: str) -> None: ...

class MusicAssistantConfigFlow(ConfigFlow, domain=DOMAIN):
    VERSION: int
    url: str | None
    token: str | None
    server_info: ServerInfoMessage | None
    def __init__(self) -> None: ...
    async def async_step_user(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
    async def async_step_hassio(self, discovery_info: HassioServiceInfo) -> ConfigFlowResult: ...
    async def async_step_hassio_confirm(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
    async def async_step_zeroconf(self, discovery_info: ZeroconfServiceInfo) -> ConfigFlowResult: ...
    async def async_step_discovery_confirm(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
    async def async_step_auth(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
    async def async_step_finish_auth(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
    async def async_step_auth_manual(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
    async def async_step_reauth(self, entry_data: Mapping[str, Any]) -> ConfigFlowResult: ...
    async def async_step_reauth_confirm(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
