"""
Foundation component schemas.

Mirrors lightwave-ui/src/components/foundations/.

These are foundational visual elements:
- featured_icon: Featured icon components
- logo: Brand logo components
- payment_icons: Payment method icons
- social_icons: Social media icons

Usage:
    from lightwave.schema.pydantic.ui.components.foundations import (
        FeaturedIconProps,
        LogoProps,
    )
"""

from typing import Literal

from pydantic import BaseModel, ConfigDict, Field


class FeaturedIconProps(BaseModel):
    """
    Featured icon component props.

    Matches TypeScript FeaturedIconProps.
    """

    icon: str = Field(..., description="Icon name")
    color: Literal["brand", "gray", "error", "warning", "success"] = Field("brand", description="Icon color")
    size: Literal["sm", "md", "lg", "xl"] = Field("md", description="Icon size")
    theme: Literal["light", "dark", "outline"] = Field("light", description="Icon theme/style")

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


class LogoProps(BaseModel):
    """
    Brand logo component props.

    Matches TypeScript LogoProps.
    """

    logo_url: str | None = Field(None, serialization_alias="logoUrl", description="Logo image URL")
    logo_url_dark: str | None = Field(None, serialization_alias="logoUrlDark", description="Dark mode logo URL")
    name: str | None = Field(None, description="Brand name (for alt text)")
    href: str | None = Field("/", description="Logo link URL")

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


class SocialIconProps(BaseModel):
    """
    Social icon props.
    """

    platform: Literal["twitter", "facebook", "instagram", "linkedin", "youtube", "github", "dribbble"] = Field(
        ..., description="Social platform"
    )
    href: str = Field(..., description="Profile URL")
    size: Literal["sm", "md", "lg"] = Field("md", description="Icon size")

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


class PaymentIconProps(BaseModel):
    """
    Payment method icon props.
    """

    method: Literal["visa", "mastercard", "amex", "paypal", "apple-pay", "google-pay", "stripe"] = Field(
        ..., description="Payment method"
    )
    size: Literal["sm", "md", "lg"] = Field("md", description="Icon size")

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


__all__ = [
    "FeaturedIconProps",
    "LogoProps",
    "SocialIconProps",
    "PaymentIconProps",
]
