# This file is part of the faebryk project
# SPDX-License-Identifier: MIT

# This file is auto-generated by zig.
# Do not edit this file directly; edit the corresponding
# Zig file instead.

from enum import Enum, IntEnum  # noqa: F401
from typing import Any  # noqa: F401

from faebryk.core.zig.gen.sexp.pcb import Effects, Xy, Xyr

# Dirty hack to not error in ruff check
type Allocator = Any

class E_fill_type(str, Enum):
    BACKGROUND = "background"
    NONE = "none"
    OUTLINE = "outline"

class E_stroke_type(str, Enum):
    SOLID = "solid"
    DEFAULT = "default"

class E_pin_type(str, Enum):
    BIDIRECTIONAL = "bidirectional"
    FREE = "free"
    INPUT = "input"
    NO_CONNECT = "no_connect"
    OPEN_COLLECTOR = "open_collector"
    OPEN_EMITTER = "open_emitter"
    OUTPUT = "output"
    PASSIVE = "passive"
    POWER_IN = "power_in"
    POWER_OUT = "power_out"
    TRI_STATE = "tri_state"
    UNSPECIFIED = "unspecified"

class E_pin_style(str, Enum):
    CLOCK = "clock"
    CLOCK_LOW = "clock_low"
    EDGE_CLOCK_HIGH = "edge_clock_high"
    INPUT_LOW = "input_low"
    INVERTED = "inverted"
    INVERTED_CLOCK = "inverted_clock"
    LINE = "line"
    NON_LOGIC = "non_logic"
    OUTPUT_LOW = "output_low"

class E_sheet_pin_type(str, Enum):
    BIDIRECTIONAL = "bidirectional"
    INPUT = "input"
    OUTPUT = "output"
    PASSIVE = "passive"
    TRI_STATE = "tri_state"

class E_global_label_shape(str, Enum):
    INPUT = "input"
    OUTPUT = "output"
    BIDIRECTIONAL = "bidirectional"
    TRI_STATE = "tri_state"
    PASSIVE = "passive"
    DOT = "dot"
    ROUND = "round"
    DIAMOND = "diamond"
    RECTANGLE = "rectangle"

class E_hide(str, Enum):
    HIDE = "hide"

class Pts:
    xys: list[Xy]

    def __init__(self, *, xys: list[Xy]) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class Fill:
    type: str

    def __init__(self, *, type: str) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class Stroke:
    width: float
    type: str
    color: Color

    def __init__(self, *, width: float, type: str, color: Color) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class Circle:
    center: Xy
    end: Xy
    stroke: Stroke
    fill: Fill

    def __init__(self, *, center: Xy, end: Xy, stroke: Stroke, fill: Fill) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class Arc:
    start: Xy
    mid: Xy
    end: Xy
    stroke: Stroke
    fill: Fill

    def __init__(
        self, *, start: Xy, mid: Xy, end: Xy, stroke: Stroke, fill: Fill
    ) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class Rect:
    start: Xy
    end: Xy
    stroke: Stroke
    fill: Fill

    def __init__(self, *, start: Xy, end: Xy, stroke: Stroke, fill: Fill) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class Polyline:
    stroke: Stroke
    fill: Fill
    pts: Pts

    def __init__(self, *, stroke: Stroke, fill: Fill, pts: Pts) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class Property:
    name: str
    value: str
    id: int | None
    at: Xyr
    effects: Effects | None

    def __init__(
        self, *, name: str, value: str, id: int | None, at: Xyr, effects: Effects | None
    ) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class PinNames:
    offset: float

    def __init__(self, *, offset: float) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class PinName:
    name: str
    effects: Effects

    def __init__(self, *, name: str, effects: Effects) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class PinNumber:
    number: str
    effects: Effects

    def __init__(self, *, number: str, effects: Effects) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class SymbolPin:
    at: Xyr
    length: float
    type: str
    style: str
    name: PinName
    number: PinNumber

    def __init__(
        self,
        *,
        at: Xyr,
        length: float,
        type: str,
        style: str,
        name: PinName,
        number: PinNumber,
    ) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class SymbolUnit:
    name: str
    polylines: list[Polyline]
    circles: list[Circle]
    rectangles: list[Rect]
    arcs: list[Arc]
    pins: list[SymbolPin]

    def __init__(
        self,
        *,
        name: str,
        polylines: list[Polyline],
        circles: list[Circle],
        rectangles: list[Rect],
        arcs: list[Arc],
        pins: list[SymbolPin],
    ) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class Symbol:
    name: str
    power: bool
    propertys: list[Property]
    pin_numbers: str | None
    pin_names: PinNames | None
    in_bom: bool | None
    on_board: bool | None
    symbols: list[SymbolUnit]
    convert: int | None

    def __init__(
        self,
        *,
        name: str,
        power: bool,
        propertys: list[Property],
        pin_numbers: str | None,
        pin_names: PinNames | None,
        in_bom: bool | None,
        on_board: bool | None,
        symbols: list[SymbolUnit],
        convert: int | None,
    ) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class InstancePin:
    name: str
    uuid: str

    def __init__(self, *, name: str, uuid: str) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class SymbolInstance:
    lib_id: str
    at: Xyr
    unit: int
    in_bom: bool
    on_board: bool
    uuid: str
    fields_autoplaced: bool
    propertys: list[Property]
    pins: list[InstancePin]
    convert: int | None

    def __init__(
        self,
        *,
        lib_id: str,
        at: Xyr,
        unit: int,
        in_bom: bool,
        on_board: bool,
        uuid: str,
        fields_autoplaced: bool,
        propertys: list[Property],
        pins: list[InstancePin],
        convert: int | None,
    ) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class Junction:
    at: Xy
    diameter: float
    color: Color
    uuid: str

    def __init__(self, *, at: Xy, diameter: float, color: Color, uuid: str) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class Wire:
    pts: Pts
    stroke: Stroke
    uuid: str

    def __init__(self, *, pts: Pts, stroke: Stroke, uuid: str) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class Text:
    text: str
    at: Xyr
    effects: Effects
    uuid: str

    def __init__(self, *, text: str, at: Xyr, effects: Effects, uuid: str) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class SheetPin:
    name: str
    type: str
    at: Xyr
    effects: Effects
    uuid: str

    def __init__(
        self, *, name: str, type: str, at: Xyr, effects: Effects, uuid: str
    ) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class Sheet:
    at: Xy
    size: Xy
    stroke: Stroke
    fill: Fill
    uuid: str
    fields_autoplaced: bool
    propertys: list[Property]
    pins: list[SheetPin]

    def __init__(
        self,
        *,
        at: Xy,
        size: Xy,
        stroke: Stroke,
        fill: Fill,
        uuid: str,
        fields_autoplaced: bool,
        propertys: list[Property],
        pins: list[SheetPin],
    ) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class GlobalLabel:
    text: str
    shape: str
    at: Xyr
    effects: Effects
    uuid: str
    fields_autoplaced: bool
    propertys: list[Property]

    def __init__(
        self,
        *,
        text: str,
        shape: str,
        at: Xyr,
        effects: Effects,
        uuid: str,
        fields_autoplaced: bool,
        propertys: list[Property],
    ) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class Label:
    text: str
    at: Xyr
    effects: Effects
    uuid: str

    def __init__(self, *, text: str, at: Xyr, effects: Effects, uuid: str) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class Bus:
    pts: Pts
    stroke: Stroke
    uuid: str

    def __init__(self, *, pts: Pts, stroke: Stroke, uuid: str) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class BusEntry:
    at: Xy
    size: Xy
    stroke: Stroke
    uuid: str

    def __init__(self, *, at: Xy, size: Xy, stroke: Stroke, uuid: str) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class TitleBlock:
    title: str | None
    date: str | None
    rev: str | None
    company: str | None

    def __init__(
        self,
        *,
        title: str | None,
        date: str | None,
        rev: str | None,
        company: str | None,
    ) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class LibSymbols:
    symbols: list[Symbol]

    def __init__(self, *, symbols: list[Symbol]) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class Color:
    r: int
    g: int
    b: int
    a: int

    def __init__(self, *, r: int, g: int, b: int, a: int) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class KicadSch:
    version: int
    generator: str
    paper: str
    uuid: str
    lib_symbols: LibSymbols
    title_block: TitleBlock
    junctions: list[Junction]
    wires: list[Wire]
    texts: list[Text]
    symbols: list[SymbolInstance]
    sheets: list[Sheet]
    global_labels: list[GlobalLabel]
    no_connects: list[Xy]
    buss: list[Bus]
    labels: list[Label]
    bus_entrys: list[BusEntry]

    def __init__(
        self,
        *,
        version: int,
        generator: str,
        paper: str,
        uuid: str,
        lib_symbols: LibSymbols,
        title_block: TitleBlock,
        junctions: list[Junction],
        wires: list[Wire],
        texts: list[Text],
        symbols: list[SymbolInstance],
        sheets: list[Sheet],
        global_labels: list[GlobalLabel],
        no_connects: list[Xy],
        buss: list[Bus],
        labels: list[Label],
        bus_entrys: list[BusEntry],
    ) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...

class SchematicFile:
    kicad_sch: KicadSch

    def __init__(self, *, kicad_sch: KicadSch) -> None: ...
    def __repr__(self) -> str: ...
    @staticmethod
    def __field_names__() -> list[str]: ...
    def __zig_address__(self) -> int: ...
    @staticmethod
    def loads(*, arg_0: Allocator, arg_1: Any) -> SchematicFile: ...
    @staticmethod
    def dumps(*, arg_0: SchematicFile, arg_1: Allocator, arg_2: Any) -> None: ...
    def free(self, *, arg_0: Allocator) -> None: ...

# Module-level functions
def loads(data: str) -> SchematicFile: ...
def dumps(obj: SchematicFile) -> str: ...
