from dataclasses import dataclass

from kiutils.items.common import Image as Image
from kiutils.items.common import PageSettings as PageSettings
from kiutils.items.common import TitleBlock as TitleBlock
from kiutils.items.schitems import *
from kiutils.misc.config import KIUTILS_CREATE_NEW_GENERATOR_STR as KIUTILS_CREATE_NEW_GENERATOR_STR
from kiutils.misc.config import KIUTILS_CREATE_NEW_VERSION_STR as KIUTILS_CREATE_NEW_VERSION_STR
from kiutils.symbol import Symbol as Symbol
from kiutils.utils import sexpr as sexpr

@dataclass
class Schematic:
    version: str = ...
    generator: str = ...
    uuid: str | None = ...
    paper: PageSettings = ...
    titleBlock: TitleBlock | None = ...
    libSymbols: list[Symbol] = ...
    schematicSymbols: list[SchematicSymbol] = ...
    junctions: list[Junction] = ...
    noConnects: list[NoConnect] = ...
    busEntries: list[BusEntry] = ...
    busAliases: list[BusAlias] = ...
    graphicalItems: list[Connection | PolyLine] = ...
    shapes: list[Arc | Circle | Rectangle] = ...
    images: list[Image] = ...
    texts: list[Text] = ...
    textBoxes: list[TextBox] = ...
    labels: list[LocalLabel] = ...
    globalLabels: list[GlobalLabel] = ...
    hierarchicalLabels: list[HierarchicalLabel] = ...
    netclassFlags: list[NetclassFlag] = ...
    sheets: list[HierarchicalSheet] = ...
    sheetInstances: list[HierarchicalSheetInstance] = ...
    symbolInstances: list[SymbolInstance] = ...
    filePath: str | None = ...
    @classmethod
    def from_sexpr(cls, exp: list) -> Schematic: ...
    @classmethod
    def from_file(cls, filepath: str, encoding: str | None = None) -> Schematic: ...
    @classmethod
    def create_new(cls) -> Schematic: ...
    def to_file(self, filepath=None, encoding: str | None = None): ...
    def to_sexpr(self, indent: int = 0, newline: bool = True) -> str: ...
