import dataclasses
from .storage import Store as Store
from _typeshed import Incomplete
from datetime import datetime
from enum import StrEnum
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
from homeassistant.util.async_ import run_callback_threadsafe as run_callback_threadsafe
from typing import Any

DATA_REGISTRY: str
EVENT_REPAIRS_ISSUE_REGISTRY_UPDATED: str
STORAGE_KEY: str
STORAGE_VERSION_MAJOR: int
STORAGE_VERSION_MINOR: int
SAVE_DELAY: int

class IssueSeverity(StrEnum):
    CRITICAL: str
    ERROR: str
    WARNING: str

@dataclasses.dataclass(slots=True, frozen=True)
class IssueEntry:
    active: bool
    breaks_in_ha_version: str | None
    created: datetime
    data: dict[str, str | int | float | None] | None
    dismissed_version: str | None
    domain: str
    is_fixable: bool | None
    is_persistent: bool
    issue_domain: str | None
    issue_id: str
    learn_more_url: str | None
    severity: IssueSeverity | None
    translation_key: str | None
    translation_placeholders: dict[str, str] | None
    def to_json(self) -> dict[str, Any]: ...
    def __init__(self, active, breaks_in_ha_version, created, data, dismissed_version, domain, is_fixable, is_persistent, issue_domain, issue_id, learn_more_url, severity, translation_key, translation_placeholders) -> None: ...

class IssueRegistryStore(Store[dict[str, list[dict[str, Any]]]]):
    async def _async_migrate_func(self, old_major_version: int, old_minor_version: int, old_data: dict[str, Any]) -> dict[str, Any]: ...

class IssueRegistry:
    hass: Incomplete
    issues: Incomplete
    _read_only: Incomplete
    _store: Incomplete
    def __init__(self, hass: HomeAssistant, *, read_only: bool = False) -> None: ...
    def async_get_issue(self, domain: str, issue_id: str) -> IssueEntry | None: ...
    def async_get_or_create(self, domain: str, issue_id: str, *, breaks_in_ha_version: str | None = None, data: dict[str, str | int | float | None] | None = None, is_fixable: bool, is_persistent: bool, issue_domain: str | None = None, learn_more_url: str | None = None, severity: IssueSeverity, translation_key: str, translation_placeholders: dict[str, str] | None = None) -> IssueEntry: ...
    def async_delete(self, domain: str, issue_id: str) -> None: ...
    def async_ignore(self, domain: str, issue_id: str, ignore: bool) -> IssueEntry: ...
    async def async_load(self) -> None: ...
    def async_schedule_save(self) -> None: ...
    def _data_to_save(self) -> dict[str, list[dict[str, str | None]]]: ...

def async_get(hass: HomeAssistant) -> IssueRegistry: ...
async def async_load(hass: HomeAssistant, *, read_only: bool = False) -> None: ...
def async_create_issue(hass: HomeAssistant, domain: str, issue_id: str, *, breaks_in_ha_version: str | None = None, data: dict[str, str | int | float | None] | None = None, is_fixable: bool, is_persistent: bool = False, issue_domain: str | None = None, learn_more_url: str | None = None, severity: IssueSeverity, translation_key: str, translation_placeholders: dict[str, str] | None = None) -> None: ...
def create_issue(hass: HomeAssistant, domain: str, issue_id: str, *, breaks_in_ha_version: str | None = None, data: dict[str, str | int | float | None] | None = None, is_fixable: bool, is_persistent: bool = False, issue_domain: str | None = None, learn_more_url: str | None = None, severity: IssueSeverity, translation_key: str, translation_placeholders: dict[str, str] | None = None) -> None: ...
def async_delete_issue(hass: HomeAssistant, domain: str, issue_id: str) -> None: ...
def delete_issue(hass: HomeAssistant, domain: str, issue_id: str) -> None: ...
def async_ignore_issue(hass: HomeAssistant, domain: str, issue_id: str, ignore: bool) -> None: ...
