import datetime
from _typeshed import MaybeNone
from collections import OrderedDict
from collections.abc import Mapping
from logging import Logger
from typing import Any, TypeVar

from dateparser.conf import Settings

_DateT = TypeVar("_DateT", bound=datetime.date)
_DateTimeT = TypeVar("_DateTimeT", bound=datetime.datetime)

def strip_braces(date_string: str) -> str: ...
def normalize_unicode(string: str, form: str = "NFKD") -> str: ...
def combine_dicts(
    primary_dict: Mapping[Any, Any], supplementary_dict: Mapping[Any, Any]
) -> OrderedDict[str, str | list[Any]]: ...
def find_date_separator(format: str) -> str | MaybeNone | None: ...
def localize_timezone(date_time: _DateTimeT, tz_string: str) -> _DateTimeT: ...
def apply_tzdatabase_timezone(date_time: _DateTimeT, pytz_string: str) -> _DateTimeT: ...
def apply_dateparser_timezone(utc_datetime: _DateTimeT, offset_or_timezone_abb) -> _DateTimeT | None: ...
def apply_timezone(date_time: _DateTimeT, tz_string: str) -> _DateTimeT: ...
def apply_timezone_from_settings(date_obj: _DateTimeT, settings: Settings | None) -> _DateTimeT: ...
def get_last_day_of_month(year: int, month: int) -> int: ...
def get_previous_leap_year(year: int) -> int: ...
def get_next_leap_year(year: int) -> int: ...
def set_correct_day_from_settings(date_obj: _DateT, settings: Settings, current_day: int | None = None) -> _DateT: ...
def set_correct_month_from_settings(date_obj: _DateT, settings: Settings, current_month: int | None = None) -> _DateT: ...
def registry(cls): ...
def get_logger() -> Logger: ...
def setup_logging() -> None: ...

# TODO: this needs `types-pytz` and a type-alias
def get_timezone_from_tz_string(tz_string: str): ...
