import abc
from .const import DOCS_WEB_FLASHER_URL as DOCS_WEB_FLASHER_URL, DOMAIN as DOMAIN, HardwareVariant as HardwareVariant, ZHA_DOMAIN as ZHA_DOMAIN
from .util import get_hardware_variant as get_hardware_variant, get_otbr_addon_manager as get_otbr_addon_manager, get_usb_service_info as get_usb_service_info, get_zha_device_path as get_zha_device_path, get_zigbee_flasher_addon_manager as get_zigbee_flasher_addon_manager
from _typeshed import Incomplete
from abc import ABC, abstractmethod
from homeassistant.components import usb as usb
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.homeassistant_hardware import silabs_multiprotocol_addon as silabs_multiprotocol_addon
from homeassistant.components.zha.repairs.wrong_silabs_firmware import probe_silabs_firmware_type as probe_silabs_firmware_type
from homeassistant.config_entries import ConfigEntry as ConfigEntry, ConfigEntryBaseFlow as ConfigEntryBaseFlow, ConfigFlow as ConfigFlow, ConfigFlowResult as ConfigFlowResult, OptionsFlow as OptionsFlow, OptionsFlowWithConfigEntry as OptionsFlowWithConfigEntry
from homeassistant.core import callback as callback
from homeassistant.data_entry_flow import AbortFlow as AbortFlow
from typing import Any

_LOGGER: Incomplete
STEP_PICK_FIRMWARE_THREAD: str
STEP_PICK_FIRMWARE_ZIGBEE: str

class BaseFirmwareInstallFlow(ConfigEntryBaseFlow, ABC, metaclass=abc.ABCMeta):
    _failed_addon_name: str
    _failed_addon_reason: str
    _usb_info: Incomplete
    _hw_variant: Incomplete
    _probed_firmware_type: Incomplete
    addon_install_task: Incomplete
    addon_start_task: Incomplete
    addon_uninstall_task: Incomplete
    def __init__(self, *args: Any, **kwargs: Any) -> None: ...
    def _get_translation_placeholders(self) -> dict[str, str]: ...
    async def _async_set_addon_config(self, config: dict, addon_manager: AddonManager) -> None: ...
    async def _async_get_addon_info(self, addon_manager: AddonManager) -> AddonInfo: ...
    async def async_step_pick_firmware(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
    async def _probe_firmware_type(self) -> bool: ...
    async def async_step_pick_firmware_zigbee(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
    async def async_step_install_zigbee_flasher_addon(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
    async def _install_addon(self, addon_manager: silabs_multiprotocol_addon.WaitingAddonManager, step_id: str, next_step_id: str) -> ConfigFlowResult: ...
    async def async_step_addon_operation_failed(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
    async def async_step_run_zigbee_flasher_addon(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
    async def async_step_uninstall_zigbee_flasher_addon(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
    async def async_step_confirm_zigbee(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
    async def async_step_pick_firmware_thread(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
    async def async_step_install_otbr_addon(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
    async def async_step_start_otbr_addon(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
    async def async_step_confirm_otbr(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
    @abstractmethod
    def _async_flow_finished(self) -> ConfigFlowResult: ...

class HomeAssistantSkyConnectConfigFlow(BaseFirmwareInstallFlow, ConfigFlow, domain=DOMAIN):
    VERSION: int
    MINOR_VERSION: int
    @staticmethod
    def async_get_options_flow(config_entry: ConfigEntry) -> OptionsFlow: ...
    _usb_info: Incomplete
    _hw_variant: Incomplete
    async def async_step_usb(self, discovery_info: usb.UsbServiceInfo) -> ConfigFlowResult: ...
    async def async_step_confirm(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
    def _async_flow_finished(self) -> ConfigFlowResult: ...

class HomeAssistantSkyConnectMultiPanOptionsFlowHandler(silabs_multiprotocol_addon.OptionsFlowHandler):
    async def _async_serial_port_settings(self) -> silabs_multiprotocol_addon.SerialPortSettings: ...
    async def _async_zha_physical_discovery(self) -> dict[str, Any]: ...
    @property
    def _hw_variant(self) -> HardwareVariant: ...
    def _zha_name(self) -> str: ...
    def _hardware_name(self) -> str: ...
    async def async_step_flashing_complete(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...

class HomeAssistantSkyConnectOptionsFlowHandler(BaseFirmwareInstallFlow, OptionsFlowWithConfigEntry):
    _usb_info: Incomplete
    _probed_firmware_type: Incomplete
    _hw_variant: Incomplete
    context: Incomplete
    def __init__(self, *args: Any, **kwargs: Any) -> None: ...
    async def async_step_init(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
    async def async_step_pick_firmware_zigbee(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
    async def async_step_pick_firmware_thread(self, user_input: dict[str, Any] | None = None) -> ConfigFlowResult: ...
    def _async_flow_finished(self) -> ConfigFlowResult: ...
