"""
Careers section component schemas.

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

from pydantic import BaseModel, ConfigDict, Field

from lightwave.schema.pydantic.ui.types import CTAProps


class JobItem(BaseModel):
    """
    Job listing item.

    Matches TypeScript:
        interface JobItem {
            id: string;
            title: string;
            department: string;
            location: string;
            type?: string;
            href: string;
        }
    """

    id: str = Field(..., description="Job ID")
    title: str = Field(..., description="Job title")
    department: str = Field(..., description="Department name")
    location: str = Field(..., description="Location (e.g., 'Remote', 'NYC')")
    type: str | None = Field(None, description="Job type (e.g., 'Full-time', 'Contract')")
    href: str = Field(..., description="Job application URL")

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


class CareersSectionProps(BaseModel):
    """
    Base careers 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")
    jobs: list[JobItem] | None = Field(None, description="List of job openings")
    cta: CTAProps | None = Field(None, description="View all jobs CTA")

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


class CareersCard01Props(CareersSectionProps):
    """
    Careers with card layout.
    """

    show_department_filter: bool | None = Field(
        False,
        serialization_alias="showDepartmentFilter",
        description="Show department filter",
    )


__all__ = [
    "JobItem",
    "CareersSectionProps",
    "CareersCard01Props",
]
