"""Layers. Split out of the single 1854-line ``AutoCADBackend`` ABC in v1.5.0 (M7). ``AutoCADBackend`` composes every contract in this package, so importing ``backends.base.AutoCADBackend`` is unchanged for callers. """ from __future__ import annotations from abc import ABC, abstractmethod from typing import TYPE_CHECKING if TYPE_CHECKING: from backends.base import LayerInfo class LayerContract(ABC): @abstractmethod async def layer_list(self) -> list[LayerInfo]: ... @abstractmethod async def layer_create( self, name: str, color: int = 7, linetype: str = "Continuous", lineweight: float = -3, ) -> LayerInfo: ... @abstractmethod async def layer_delete(self, name: str) -> dict: ... @abstractmethod async def layer_set_current(self, name: str) -> dict: ... @abstractmethod async def layer_modify( self, name: str, color: int | None = None, linetype: str | None = None, lineweight: float | None = None, ) -> LayerInfo: ... @abstractmethod async def layer_freeze(self, name: str) -> dict: ... @abstractmethod async def layer_thaw(self, name: str) -> dict: ... @abstractmethod async def layer_lock(self, name: str) -> dict: ... @abstractmethod async def layer_unlock(self, name: str) -> dict: ... @abstractmethod async def layer_hide(self, name: str) -> dict: ... @abstractmethod async def layer_show(self, name: str) -> dict: ...