# generated by datamodel-codegen:
#   filename:  core/assets/html_asset.json
#   timestamp: 2026-02-28T17:39:50+00:00

from __future__ import annotations

from typing import Annotated

from adcp.types.base import AdCPBaseModel
from pydantic import ConfigDict, Field

from .. import provenance as provenance_1


class Accessibility(AdCPBaseModel):
    alt_text: Annotated[
        str | None, Field(description='Text alternative describing the creative content')
    ] = None
    keyboard_navigable: Annotated[
        bool | None, Field(description='Whether the creative can be fully operated via keyboard')
    ] = None
    motion_control: Annotated[
        bool | None,
        Field(
            description='Whether the creative respects prefers-reduced-motion or provides pause/stop controls'
        ),
    ] = None
    screen_reader_tested: Annotated[
        bool | None, Field(description='Whether the creative has been tested with screen readers')
    ] = None


class HtmlAsset(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    accessibility: Annotated[
        Accessibility | None,
        Field(description='Self-declared accessibility properties for this opaque creative'),
    ] = None
    content: Annotated[str, Field(description='HTML content')]
    provenance: Annotated[
        provenance_1.Provenance | None,
        Field(
            description='Provenance metadata for this asset, overrides manifest-level provenance'
        ),
    ] = None
    version: Annotated[str | None, Field(description="HTML version (e.g., 'HTML5')")] = None
