import os
from .resources import (
    RESOURCES_PATH as RESOURCES_PATH,
    ResourseGenerator as ResourseGenerator,
)
from typing import Any, Callable, Protocol, TypeVar

# Type check only
class _QStyle(Protocol): ...
class _QObject(Protocol): ...
class _QColor(Protocol): ...
class _QApplication(Protocol): ...
class _QWidget(Protocol): ...
class _QMainWindow(Protocol): ...

_Theme = dict[str, Any]
Path = os.PathLike[str]
T = TypeVar("T")

GUI: bool
TEMPLATE_FILE: str

def export_theme(
    theme: str = ...,
    qss: Path = ...,
    rcc: Path | None = ...,
    invert_secondary: bool = ...,
    extra: _Theme = ...,
    output: str = ...,
    prefix: str = ...,
) -> None: ...
def build_stylesheet(
    theme: str = ...,
    invert_secondary: bool = ...,
    extra: _Theme = ...,
    parent: str = ...,
    template: str = ...,
    export: bool = ...,
) -> str: ...
def get_theme(theme_name: str, invert_secondary: bool = ...) -> _Theme: ...
def add_fonts() -> None: ...
def apply_stylesheet(
    app: _QApplication,
    theme: str = ...,
    style: _QStyle | None = ...,
    save_as: Path | None = ...,
    invert_secondary: bool = ...,
    extra: _Theme = ...,
    parent: str = ...,
) -> None: ...
def opacity(theme: str, value: float = ...) -> str: ...
def density(
    value: str | float,
    density_scale: int | float,
    border: int = ...,
    scale: int = ...,
    density_interval: int = ...,
) -> int: ...
def set_icons_theme(theme: _Theme, parent: str = ...) -> None: ...
def list_themes() -> list[str]: ...
def deprecated(replace: Any) -> Callable[[T], T]: ...

class QtStyleTools:
    extra_values: _Theme
    def set_extra_colors(self, extra: _Theme) -> None: ...
    def set_extra(self, extra: _Theme) -> None: ...
    menu_theme_: _QObject
    def add_menu_theme(self, parent: _QObject, menu: _QObject) -> None: ...
    menu_density_: _QObject
    def add_menu_density(self, parent: _QObject, menu: _QObject) -> None: ...
    def apply_stylesheet(
        self,
        parent: _QApplication | _QWidget,
        theme: str,
        invert_secondary: bool = ...,
        extra: _Theme = ...,
        callable_: Callable[[], Any] | None = ...,
    ) -> None: ...
    def update_theme_event(self, parent: _QApplication | _QWidget) -> None: ...
    def update_buttons(self) -> None: ...
    def get_color(self, color: str) -> _QColor: ...
    def update_theme(self, parent: _QApplication | _QWidget) -> None: ...
    def set_color(
        self, parent: _QApplication | _QWidget, button_: str
    ) -> Callable[[], None]: ...
    colors: list[str]
    custom_colors: dict[str, str]
    dock_theme: _QWidget
    def show_dock_theme(self, parent: _QMainWindow) -> None: ...

def get_hook_dirs() -> list[str]: ...
