import datetime
from dateutil.parser import parserinfo

# Timelex
def timelex(data: str) -> list[str]: ...

# Configs
class Configs:
    def __init__(self, yearfirst: bool = True, dayfirst: bool = False) -> None: ...
    @classmethod
    def from_parserinfo(cls, info: parserinfo) -> Configs: ...
    # Property
    @property
    def yearfirst(self) -> bool: ...
    @property
    def dayfirst(self) -> bool: ...
    def order_hint(self) -> str: ...
    # Jump
    @property
    def jump(self) -> set[str]: ...
    def add_jump(self, token: str) -> bool: ...
    def remove_jump(self, token: str) -> bool: ...
    def replace_jump(self, tokens: set[str] | None = None) -> bool: ...
    def is_jump(self, token: str) -> bool: ...
    # Pertain
    @property
    def pertain(self) -> set[str]: ...
    def add_pertain(self, token: str) -> bool: ...
    def remove_pertain(self, token: str) -> bool: ...
    def replace_pertain(self, tokens: set[str] | None = None) -> bool: ...
    def is_pertain(self, token: str) -> bool: ...
    # UTC
    @property
    def utc(self) -> set[str]: ...
    def add_utc(self, token: str) -> bool: ...
    def remove_utc(self, token: str) -> bool: ...
    def replace_utc(self, tokens: set[str] | None = None) -> bool: ...
    def is_utc(self, token: str) -> bool: ...
    # Timezone
    @property
    def tz(self) -> dict[str, int]: ...
    def add_tz(
        self,
        token: str,
        hours: int = 0,
        minutes: int = 0,
        seconds: int = 0,
    ) -> bool: ...
    def remove_tz(self, token: str) -> bool: ...
    def replace_tz(self, mapping: dict[str, int] | None = None) -> bool: ...
    def is_tz(self, token: str) -> bool: ...
    def get_tz_offset(self, token: str) -> int: ...
    # Month
    @property
    def month(self) -> dict[str, int]: ...
    def add_month(self, token: str, month: int) -> bool: ...
    def remove_month(self, token: str) -> bool: ...
    def replace_month(self, mapping: dict[str, int] | None = None) -> bool: ...
    def is_month(self, token: str) -> bool: ...
    def get_month(self, token: str) -> int: ...
    # Weekday
    @property
    def weekday(self) -> dict[str, int]: ...
    def add_weekday(self, token: str, weekday: int) -> bool: ...
    def remove_weekday(self, token: str) -> bool: ...
    def replace_weekday(self, mapping: dict[str, int] | None = None) -> bool: ...
    def is_weekday(self, token: str) -> bool: ...
    def get_weekday(self, token: str) -> int: ...
    # HMS flag
    @property
    def hms(self) -> dict[str, int]: ...
    def add_hms(self, token: str, flag: int) -> bool: ...
    def remove_hms(self, token: str) -> bool: ...
    def replace_hms(self, mapping: dict[str, int] | None = None) -> bool: ...
    def is_hms(self, token: str) -> bool: ...
    def get_hms(self, token: str) -> int: ...
    # AM/PM flag
    @property
    def ampm(self) -> dict[str, int]: ...
    def add_ampm(self, token: str, flag: int) -> bool: ...
    def remove_ampm(self, token: str) -> bool: ...
    def replace_ampm(self, mapping: dict[str, int] | None = None) -> bool: ...
    def is_ampm(self, token: str) -> bool: ...
    def get_ampm(self, token: str) -> int: ...
    # Clear & Reset
    def clear_settings(self) -> bool: ...
    def reset_settings(self) -> bool: ...
    # Special methods
    def __repr__(self) -> str: ...

# Parser
class Parser:
    def __init__(self, cfg: Configs | None = None) -> None: ...
    # Parse
    def parse(
        self,
        dtstr: str,
        default: datetime.date | datetime.datetime | None = None,
        yearfirst: bool | None = None,
        dayfirst: bool | None = None,
        ignoretz: bool = True,
        isoformat: bool = True,
        dtclass: type[datetime.datetime] | None = None,
    ) -> datetime.datetime: ...

def parse(
    dtstr: str,
    default: datetime.date | datetime.datetime | None = None,
    yearfirst: bool | None = None,
    dayfirst: bool | None = None,
    ignoretz: bool = True,
    isoformat: bool = True,
    cfg: Configs | None = None,
    dtclass: type[datetime.datetime] | None = None,
) -> datetime.datetime: ...
def parse_obj(
    dtobj: object,
    default: datetime.date | datetime.datetime | None = None,
    yearfirst: bool | None = None,
    dayfirst: bool | None = None,
    ignoretz: bool = True,
    isoformat: bool = True,
    cfg: Configs | None = None,
    dtclass: type[datetime.datetime] | None = None,
) -> datetime.datetime: ...
def parse_month(
    token: str,
    cfg: Configs | None = None,
    raise_error: bool = True,
) -> int: ...
def parse_weekday(
    token: str,
    cfg: Configs | None = None,
    raise_error: bool = True,
) -> int: ...
