"""The written half of an airport page: where the duty free actually is.

The structure proposal's airport page is about the duty free situation at that
airport and nothing else — where the shops are, terminal by terminal, which
specialty boutiques sit around them, a map where one helps. It is written,
because the data holds a shop as "a retailer at an airport" and knows nothing
about terminals or named boutiques within one (`app/models/hubs.py`). When the
collectors can name a terminal the structured half moves there; the colour
stays here either way.

Why in code rather than a table: it is a few paragraphs per airport, changed a
few times a year, reviewed like the rest of the site's copy. Both renderers read
it — the SPA through `/api/airports/{iata}`, the crawler's body through
`seo.airport_body` — so the two pages cannot drift.

Nothing here is guessed. An airport with no entry simply has no guide, and the
page says so in the demo's placeholder view rather than inventing filler.
"""

from app.models.hubs import AirportGuide, AirportService, AirportTerminal

GUIDES: dict[str, AirportGuide] = {
    "LHR": AirportGuide(
        operator="World Duty Free (Avolta)",
        overview=(
            "World Duty Free runs the core duty free operation in all four Heathrow terminals, "
            "but each one shops differently depending on its size, its airlines and which luxury "
            "boutiques have been layered in around the main store. Terminal 5 has the strongest "
            "luxury line-up; Terminal 3 has the largest single store and a second one built for "
            "transferring passengers; Terminal 2 splits its duty free across two gate areas; and "
            "Terminal 4 leans harder into prestige beauty than fashion."
        ),
        access="Every duty free and specialty shop below is airside, reached only after security.",
        terminals=[
            AirportTerminal(
                name="Terminal 2",
                airlines="Star Alliance",
                duty_free=(
                    "Duty free is split across two locations after security: Gate A20 in the main "
                    "T2A building and Gate B35 in the T2B satellite."
                ),
                specialty=(
                    "Burberry, Cartier, Gucci and Harrods around the core terminal, Aspinal of "
                    "London on the second floor just after passport control, and Hermès and Louis "
                    "Vuitton further along the route."
                ),
            ),
            AirportTerminal(
                name="Terminal 3",
                airlines="oneworld and Virgin Atlantic",
                duty_free=(
                    "The main World Duty Free store is one of the largest at Heathrow, over "
                    "2,500m², airside in departures, ending in a confectionery zone that pairs "
                    "British names like Fortnum & Mason and Butlers with the usual Kinder and "
                    "M&Ms. A second, smaller store of around 600m² sits inside the Flight "
                    "Connection Centre, for passengers connecting through without clearing UK "
                    "border control."
                ),
            ),
            AirportTerminal(
                name="Terminal 4",
                airlines="SkyTeam, and Gulf and Asian carriers",
                duty_free=(
                    "T4 leans further into prestige beauty than the other terminals, with La Mer, "
                    "Jo Malone London and Clarins alongside the Chanel and Dior fragrance counters."
                ),
                specialty=(
                    "Burberry, Fendi, Gucci and Tom Ford for fashion. Outside duty free proper, "
                    "InMotion covers headphones, tablets and smartwatches, and Boots and WHSmith "
                    "the essentials — Boots takes pre-orders for baby milk to collect after "
                    "security."
                ),
            ),
            AirportTerminal(
                name="Terminal 5",
                airlines="British Airways and Iberia",
                duty_free=(
                    "The main World Duty Free store is airside in the central departures hall, "
                    "straight after the main security search, with more shopping out towards the "
                    "B and C satellite piers on the internal transit train."
                ),
                specialty=(
                    "The strongest luxury line-up of the four terminals: a flagship Harrods near "
                    "the B Gates, the largest Harrods at any airport, plus Chanel, Louis Vuitton, "
                    "Dior and Burberry, and a 200m² Prada carrying its full bag, shoe and travel "
                    "accessory range. If Heathrow has one flagship duty free experience, this is it."
                ),
            ),
        ],
        services=[
            AirportService(
                title="Reserve & Collect",
                body=(
                    "In all four terminals, World Duty Free's Reserve & Collect takes an order "
                    "online up to 30 days before you fly and has it waiting at the gate on the day."
                ),
            ),
        ],
        checked="September 2026",
    ),
}


def guide_for(iata: str | None) -> AirportGuide | None:
    """The written guide for an airport, or None where nobody has written one."""
    return GUIDES.get(iata.upper()) if iata else None
