"""ProvenanceProvider - metadata/C2PA/watermark/labels."""
from __future__ import annotations

from typing import Any, Protocol, runtime_checkable


@runtime_checkable
class ProvenanceProvider(Protocol):
    """Provider for content provenance, attestation, and watermarking.

    Supports C2PA content credentials, metadata attestation,
    watermarking, and labeling for traceability.

    Backends may include local metadata store, C2PA signer,
    blockchain anchor, or external provenance service.
    """

    @property
    def provider_name(self) -> str:
        ...

    async def attest(
        self,
        content_id: str,
        content: dict[str, Any],
        *,
        metadata: dict[str, Any] | None = None,
    ) -> dict[str, Any]:
        ...

    async def verify(self, content_id: str) -> dict[str, Any] | None:
        ...

    async def watermark(
        self,
        content_id: str,
        label: str,
        *,
        visible: bool = False,
    ) -> dict[str, Any]:
        ...

    async def label(
        self,
        content_id: str,
        labels: list[str],
    ) -> bool:
        ...
