from dataclasses import dataclass, field
from typing import Any, Protocol


@dataclass(frozen=True)
class AIProviderResult:
    provider_task_id: str = ""
    status: str = "succeeded"
    payload: dict[str, Any] = field(default_factory=dict)
    asset_urls: list[str] = field(default_factory=list)


class AIProvider(Protocol):
    def submit(self, payload: dict[str, Any]) -> AIProviderResult:
        ...

    def poll(self, provider_task_id: str) -> AIProviderResult:
        ...

