import abc
from .const import LOGGER as LOGGER, SILABS_MULTIPROTOCOL_ADDON_SLUG as SILABS_MULTIPROTOCOL_ADDON_SLUG
from _typeshed import Incomplete
from abc import ABC, abstractmethod
from homeassistant import config_entries as config_entries
from homeassistant.components.hassio import AddonError as AddonError, AddonInfo as AddonInfo, AddonManager as AddonManager, AddonState as AddonState, is_hassio as is_hassio
from homeassistant.components.zha.radio_manager import ZhaMultiPANMigrationHelper as ZhaMultiPANMigrationHelper
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
from homeassistant.data_entry_flow import AbortFlow as AbortFlow, FlowHandler as FlowHandler, FlowManager as FlowManager, FlowResult as FlowResult
from homeassistant.helpers.singleton import singleton as singleton
from typing import Any

_LOGGER: Incomplete
DATA_ADDON_MANAGER: str
ADDON_SETUP_TIMEOUT: int
ADDON_SETUP_TIMEOUT_ROUNDS: int
CONF_ADDON_AUTOFLASH_FW: str
CONF_ADDON_DEVICE: str
CONF_ENABLE_MULTI_PAN: str

def get_addon_manager(hass: HomeAssistant) -> AddonManager: ...

class SerialPortSettings:
    device: str
    baudrate: str
    flow_control: bool
    def __init__(self, device, baudrate, flow_control) -> None: ...

def get_zigbee_socket(hass: HomeAssistant, addon_info: AddonInfo) -> str: ...

class BaseMultiPanFlow(FlowHandler, ABC, metaclass=abc.ABCMeta):
    install_task: Incomplete
    start_task: Incomplete
    _zha_migration_mgr: Incomplete
    def __init__(self) -> None: ...
    @property
    @abstractmethod
    def flow_manager(self) -> FlowManager: ...
    @abstractmethod
    async def _async_serial_port_settings(self) -> SerialPortSettings: ...
    @abstractmethod
    async def _async_zha_physical_discovery(self) -> dict[str, Any]: ...
    @abstractmethod
    def _hardware_name(self) -> str: ...
    @abstractmethod
    def _zha_name(self) -> str: ...
    async def async_step_install_addon(self, user_input: Union[dict[str, Any], None] = ...) -> FlowResult: ...
    async def async_step_install_failed(self, user_input: Union[dict[str, Any], None] = ...) -> FlowResult: ...
    async def async_step_start_addon(self, user_input: Union[dict[str, Any], None] = ...) -> FlowResult: ...
    async def async_step_start_failed(self, user_input: Union[dict[str, Any], None] = ...) -> FlowResult: ...
    async def _async_start_addon(self) -> None: ...
    @abstractmethod
    async def async_step_configure_addon(self, user_input: Union[dict[str, Any], None] = ...) -> FlowResult: ...
    @abstractmethod
    async def async_step_finish_addon_setup(self, user_input: Union[dict[str, Any], None] = ...) -> FlowResult: ...
    async def _async_get_addon_info(self) -> AddonInfo: ...
    async def _async_set_addon_config(self, config: dict) -> None: ...
    async def _async_install_addon(self) -> None: ...

class OptionsFlowHandler(BaseMultiPanFlow, config_entries.OptionsFlow, metaclass=abc.ABCMeta):
    config_entry: Incomplete
    original_addon_config: Incomplete
    revert_reason: Incomplete
    def __init__(self, config_entry: config_entries.ConfigEntry) -> None: ...
    @property
    def flow_manager(self) -> config_entries.OptionsFlowManager: ...
    async def async_step_init(self, user_input: Union[dict[str, Any], None] = ...) -> FlowResult: ...
    async def async_step_on_supervisor(self, user_input: Union[dict[str, Any], None] = ...) -> FlowResult: ...
    async def async_step_addon_not_installed(self, user_input: Union[dict[str, Any], None] = ...) -> FlowResult: ...
    _zha_migration_mgr: Incomplete
    async def async_step_configure_addon(self, user_input: Union[dict[str, Any], None] = ...) -> FlowResult: ...
    async def async_step_finish_addon_setup(self, user_input: Union[dict[str, Any], None] = ...) -> FlowResult: ...
    async def async_step_addon_installed(self, user_input: Union[dict[str, Any], None] = ...) -> FlowResult: ...
    async def async_step_show_revert_guide(self, user_input: Union[dict[str, Any], None] = ...) -> FlowResult: ...
    async def async_step_addon_installed_other_device(self, user_input: Union[dict[str, Any], None] = ...) -> FlowResult: ...
