from __future__ import annotations

from typing import Protocol

from app.soat_crosswalk.domain.models import CrosswalkCatalog, CrosswalkRelationship


class CupsCatalogPort(Protocol):
    @property
    def version(self) -> str: ...

    def load(self) -> None: ...

    def contains(self, code: str) -> bool: ...

    def description(self, code: str) -> str | None: ...

    def chapter(self, code: str) -> int | None: ...

    def classification(self, code: str) -> str | None: ...


class CupsSoatCrosswalkPort(Protocol):
    def load(self) -> CrosswalkCatalog: ...

    def find_by_cups(self, cups_code: str) -> list[CrosswalkRelationship]: ...

    def validate(self) -> dict[str, int | str]: ...
