from .service_info.mqtt import MqttServiceInfo as MqttServiceInfo
from .typing import DiscoveryInfoType as DiscoveryInfoType
from _typeshed import Incomplete
from collections.abc import Awaitable, Callable
from homeassistant import config_entries as config_entries
from homeassistant.components import onboarding as onboarding
from homeassistant.components.bluetooth import BluetoothServiceInfoBleak as BluetoothServiceInfoBleak
from homeassistant.components.dhcp import DhcpServiceInfo as DhcpServiceInfo
from homeassistant.components.ssdp import SsdpServiceInfo as SsdpServiceInfo
from homeassistant.components.zeroconf import ZeroconfServiceInfo as ZeroconfServiceInfo
from homeassistant.core import HomeAssistant as HomeAssistant
from homeassistant.data_entry_flow import FlowResult as FlowResult
from typing import Any, Generic, TypeVar

_R = TypeVar('_R', bound='Awaitable[bool] | bool')
DiscoveryFunctionType = Callable[[HomeAssistant], _R]
_LOGGER: Incomplete

class DiscoveryFlowHandler(config_entries.ConfigFlow, Generic[_R]):
    VERSION: int
    _domain: Incomplete
    _title: Incomplete
    _discovery_function: Incomplete
    def __init__(self, domain: str, title: str, discovery_function: DiscoveryFunctionType[_R]) -> None: ...
    async def async_step_user(self, user_input: dict[str, Any] | None = None) -> FlowResult: ...
    async def async_step_confirm(self, user_input: dict[str, Any] | None = None) -> FlowResult: ...
    async def async_step_discovery(self, discovery_info: DiscoveryInfoType) -> FlowResult: ...
    async def async_step_bluetooth(self, discovery_info: BluetoothServiceInfoBleak) -> FlowResult: ...
    async def async_step_dhcp(self, discovery_info: DhcpServiceInfo) -> FlowResult: ...
    async def async_step_homekit(self, discovery_info: ZeroconfServiceInfo) -> FlowResult: ...
    async def async_step_mqtt(self, discovery_info: MqttServiceInfo) -> FlowResult: ...
    async def async_step_zeroconf(self, discovery_info: ZeroconfServiceInfo) -> FlowResult: ...
    async def async_step_ssdp(self, discovery_info: SsdpServiceInfo) -> FlowResult: ...
    async def async_step_import(self, _: dict[str, Any] | None) -> FlowResult: ...

def register_discovery_flow(domain: str, title: str, discovery_function: DiscoveryFunctionType[Awaitable[bool] | bool]) -> None: ...

class WebhookFlowHandler(config_entries.ConfigFlow):
    VERSION: int
    _domain: Incomplete
    _title: Incomplete
    _description_placeholder: Incomplete
    _allow_multiple: Incomplete
    def __init__(self, domain: str, title: str, description_placeholder: dict, allow_multiple: bool) -> None: ...
    async def async_step_user(self, user_input: dict[str, Any] | None = None) -> FlowResult: ...

def register_webhook_flow(domain: str, title: str, description_placeholder: dict, allow_multiple: bool = False) -> None: ...
async def webhook_async_remove_entry(hass: HomeAssistant, entry: config_entries.ConfigEntry) -> None: ...
