from dataclasses import dataclass
from typing import Protocol


@dataclass(frozen=True, slots=True)
class MaterialExtraction:
    fields: dict[str, str]
    confidence: float
    warnings: tuple[str, ...]


class MaterialVisionGateway(Protocol):
    def recognize(
        self,
        *,
        content: bytes,
        media_type: str,
        material_type: str,
    ) -> MaterialExtraction: ...
