"""
CTA (Call to Action) section component schemas.

Mirrors lightwave-ui/src/components/marketing/cta/.
"""

from pydantic import BaseModel, ConfigDict, Field

from lightwave.schema.pydantic.ui.types import CompanyInfo, CTAProps, PersonInfo


class CTASectionProps(BaseModel):
    """
    Base CTA section props.
    """

    eyebrow: str | None = Field(None, description="Small text above heading")
    headline: str | None = Field(None, description="Section headline")
    description: str | None = Field(None, description="Section description")
    primary_cta: CTAProps | None = Field(None, serialization_alias="primaryCta", description="Primary CTA button")
    secondary_cta: CTAProps | None = Field(None, serialization_alias="secondaryCta", description="Secondary CTA button")

    model_config = ConfigDict(
        populate_by_name=True,
        extra="forbid",
    )


class CTASplitImage01Props(CTASectionProps):
    """
    CTA with split image layout.
    """

    image_url: str | None = Field(None, serialization_alias="imageUrl", description="Image URL")
    image_alt: str | None = Field(None, serialization_alias="imageAlt", description="Image alt text")
    image_position: str | None = Field(
        "right",
        serialization_alias="imagePosition",
        description="Image position (left/right)",
    )


class CTASplitImageQuote01Props(CTASectionProps):
    """
    CTA with split image and quote.
    """

    image_url: str | None = Field(None, serialization_alias="imageUrl", description="Image URL")
    quote: str | None = Field(None, description="Quote text")
    author: PersonInfo | None = Field(None, description="Quote author")
    company: CompanyInfo | None = Field(None, description="Author's company")


class CTAAbstractImagesBrandProps(CTASectionProps):
    """
    CTA with abstract brand images.
    """

    background_image_url: str | None = Field(
        None,
        serialization_alias="backgroundImageUrl",
        description="Background image URL",
    )
    pattern_style: str | None = Field(None, serialization_alias="patternStyle", description="Abstract pattern style")


class CTASimpleLogos02Props(CTASectionProps):
    """
    CTA with company logos.
    """

    logos: list[CompanyInfo] | None = Field(None, description="Company logo configurations")
    logo_heading: str | None = Field(None, serialization_alias="logoHeading", description="Heading above logos")


__all__ = [
    "CTASectionProps",
    "CTASplitImage01Props",
    "CTASplitImageQuote01Props",
    "CTAAbstractImagesBrandProps",
    "CTASimpleLogos02Props",
]
