from dataclasses import dataclass

from kiutils.items.common import Effects as Effects
from kiutils.items.common import Position as Position
from kiutils.items.common import RenderCache as RenderCache
from kiutils.items.common import Stroke as Stroke
from kiutils.utils.strings import dequote as dequote

@dataclass
class GrText:
    text: str = ...
    knockout: bool = ...
    position: Position = ...
    layer: str | None = ...
    effects: Effects = ...
    tstamp: str | None = ...
    locked: bool = ...
    renderCache: RenderCache | None = ...
    @classmethod
    def from_sexpr(cls, exp: list) -> GrText: ...
    def to_sexpr(self, indent: int = 2, newline: bool = True) -> str: ...

@dataclass
class GrTextBox:
    locked: bool = ...
    text: str = ...
    start: Position | None = ...
    end: Position | None = ...
    pts: list[Position] = ...
    angle: float | None = ...
    layer: str = ...
    tstamp: str | None = ...
    effects: Effects | None = ...
    stroke: Stroke | None = ...
    renderCache: RenderCache | None = ...
    @classmethod
    def from_sexpr(cls, exp: list) -> GrTextBox: ...
    def to_sexpr(self, indent: int = 2, newline: bool = True) -> str: ...

@dataclass
class GrLine:
    start: Position = ...
    end: Position = ...
    angle: float | None = ...
    layer: str | None = ...
    width: float | None = ...
    tstamp: str | None = ...
    locked: bool = ...
    @classmethod
    def from_sexpr(cls, exp: list) -> GrLine: ...
    def to_sexpr(self, indent: int = 2, newline: bool = True) -> str: ...

@dataclass
class GrRect:
    start: Position = ...
    end: Position = ...
    layer: str | None = ...
    width: float | None = ...
    fill: str | None = ...
    tstamp: str | None = ...
    locked: bool = ...
    @classmethod
    def from_sexpr(cls, exp: list) -> GrRect: ...
    def to_sexpr(self, indent: int = 2, newline: bool = True) -> str: ...

@dataclass
class GrCircle:
    center: Position = ...
    end: Position = ...
    layer: str | None = ...
    width: float | None = ...
    fill: str | None = ...
    tstamp: str | None = ...
    locked: bool = ...
    @classmethod
    def from_sexpr(cls, exp: list) -> GrCircle: ...
    def to_sexpr(self, indent: int = 2, newline: bool = True) -> str: ...

@dataclass
class GrArc:
    start: Position = ...
    mid: Position = ...
    end: Position = ...
    layer: str | None = ...
    width: float | None = ...
    tstamp: str | None = ...
    locked: bool = ...
    @classmethod
    def from_sexpr(cls, exp: list) -> GrArc: ...
    def to_sexpr(self, indent: int = 2, newline: bool = True) -> str: ...

@dataclass
class GrPoly:
    layer: str | None = ...
    coordinates: list[Position] = ...
    width: float | None = ...
    fill: str | None = ...
    tstamp: str | None = ...
    locked: bool = ...
    @classmethod
    def from_sexpr(cls, exp: list) -> GrPoly: ...
    def to_sexpr(self, indent: int = 2, newline: bool = True, pts_newline: bool = False) -> str: ...

@dataclass
class GrCurve:
    coordinates: list[Position] = ...
    layer: str | None = ...
    width: float | None = ...
    tstamp: str | None = ...
    locked: bool = ...
    @classmethod
    def from_sexpr(cls, exp: list) -> GrCurve: ...
    def to_sexpr(self, indent: int = 2, newline: bool = True) -> str: ...
