from __future__ import annotations

import typing

__all__ = [
    "Array",
    "Boolean",
    "Float",
    "Integer",
    "Item",
    "None_",
    "String",
    "Table",
    "TomlError",
    "dump",
    "load",
    "test",
]

class Item:
    def __repr__(self) -> str: ...
    def get_comments(self) -> list[str]: ...
    def owned(self) -> bool: ...
    def set_comments(self, arg0: list[str]) -> None: ...

class Array(Item):
    def __delitem__(
        self, index: int
    ) -> Boolean | Integer | Float | String | Table | Array | None: ...
    def __getitem__(
        self, index: int
    ) -> Boolean | Integer | Float | String | Table | Array | None: ...
    def __init__(
        self, values: list[Boolean | Integer | Float | String | Table | Array | None]
    ) -> None: ...
    def __iter__(
        self,
    ) -> typing.Iterator[Boolean | Integer | Float | String | Table | Array | None]: ...
    def __len__(self) -> int: ...
    def __setitem__(
        self,
        index: int,
        value: Boolean | Integer | Float | String | Table | Array | None,
    ) -> None: ...
    def append(
        self, value: Boolean | Integer | Float | String | Table | Array | None
    ) -> None: ...
    def copy(self) -> Array: ...
    def insert(
        self,
        index: int,
        value: Boolean | Integer | Float | String | Table | Array | None,
    ) -> None: ...
    def pop(
        self, index: int
    ) -> Boolean | Integer | Float | String | Table | Array | None: ...
    def value(
        self,
    ) -> list[Boolean | Integer | Float | String | Table | Array | None]: ...

class Boolean(Item):
    def __init__(self, value: bool) -> None: ...
    def copy(self) -> Boolean: ...
    def value(self) -> bool: ...

class Float(Item):
    def __init__(self, value: float) -> None: ...
    def copy(self) -> Float: ...
    def value(self) -> float: ...

class Integer(Item):
    def __init__(self, value: int) -> None: ...
    def copy(self) -> Integer: ...
    def value(self) -> int: ...

class None_(Item):
    def __init__(self, value: None) -> None: ...
    def copy(self) -> None_: ...
    def value(self) -> None: ...

class String(Item):
    def __init__(self, value: str) -> None: ...
    def copy(self) -> String: ...
    def value(self) -> str: ...

class Table(Item):
    def __contains__(self, value: str) -> bool: ...
    def __delitem__(self, key: str) -> None: ...
    def __getitem__(
        self, key: str
    ) -> Boolean | Integer | Float | String | Table | Array | None: ...
    def __init__(
        self, key: dict[str, Boolean | Integer | Float | String | Table | Array | None]
    ) -> None: ...
    def __len__(self) -> int: ...
    def __setitem__(
        self, key: str, value: Boolean | Integer | Float | String | Table | Array | None
    ) -> None: ...
    def copy(self) -> Table: ...
    def value(
        self,
    ) -> dict[str, Boolean | Integer | Float | String | Table | Array | None]: ...

class TomlError(Exception):
    pass

def dump(
    value: Boolean | Integer | Float | String | Table | Array | None_, filename: str
) -> None: ...
def load(
    filename: str,
) -> Boolean | Integer | Float | String | Table | Array | None_: ...
