from dataclasses import dataclass

from kiutils.items.common import Position as Position
from kiutils.items.gritems import GrText as GrText
from kiutils.utils.strings import dequote as dequote

@dataclass
class DimensionFormat:
    prefix: str | None = ...
    suffix: str | None = ...
    units: int = ...
    unitsFormat: int = ...
    precision: int = ...
    overrideValue: str | None = ...
    suppressZeroes: bool = ...
    @classmethod
    def from_sexpr(cls, exp: list) -> DimensionFormat: ...
    def to_sexpr(self, indent: int = 4, newline: bool = True) -> str: ...

@dataclass
class DimensionStyle:
    thickness: float = ...
    arrowLength: float = ...
    textPositionMode: int = ...
    extensionHeight: float | None = ...
    textFrame: int | None = ...
    extensionOffset: float | None = ...
    keepTextAligned: bool = ...
    @classmethod
    def from_sexpr(cls, exp: list) -> DimensionStyle: ...
    def to_sexpr(self, indent: int = 4, newline: bool = True) -> str: ...

@dataclass
class Dimension:
    locked: bool = ...
    type: str = ...
    layer: str = ...
    tstamp: str | None = ...
    pts: list[Position] = ...
    height: float | None = ...
    orientation: float | None = ...
    leaderLength: float | None = ...
    grText: GrText | None = ...
    format: DimensionFormat | None = ...
    style: DimensionStyle = ...
    @classmethod
    def from_sexpr(cls, exp: list) -> Dimension: ...
    def to_sexpr(self, indent: int = 2, newline: bool = True) -> str: ...
