import type { ZoneData } from '@/data/zones';
import { departementInPhrase, villeInPhrase, zoneInPhrase, zoneInterventionPhrase, zoneName } from '@/lib/zoneGeo';

export type LocalSeoMedia = {
  src: string;
  alt: string;
  credit: string;
  source: string;
};

export type LocalBreadcrumbItem = {
  label: string;
  href?: string;
};

type StockAsset = {
  key: string;
  categories: string[];
  photo: string;
  alt: string;
  credit: string;
  source: string;
};

type GeoHeroAsset = Omit<StockAsset, 'categories'> & {
  slugs?: string[];
  departements?: string[];
  regions?: string[];
  fallback?: boolean;
};

const unsplashImage = (photo: string, width = 1800): string =>
  `https://images.unsplash.com/${photo}?ixlib=rb-4.1.0&auto=format&fit=crop&w=${width}&q=82`;

// Banque hero géographique : utilisée avant toute image métier.
const GEO_HERO_IMAGES: GeoHeroAsset[] = [
  {
    key: 'lyon-saone',
    slugs: ['cool-roof-lyon'],
    departements: ['Rhône'],
    regions: ['Auvergne-Rhône-Alpes'],
    photo: 'photo-1682249301492-c117bddca579',
    alt: 'Vue aérienne de Lyon et de la Saône',
    credit: 'Willian Justen de Vasconcellos / Unsplash',
    source: 'https://unsplash.com/photos/an-aerial-view-of-a-city-with-a-river-running-through-it-Q8W2RhZgO6U',
  },
  {
    key: 'marseille-panorama',
    slugs: ['cool-roof-marseille'],
    departements: ['Bouches-du-Rhône'],
    regions: ['Provence-Alpes-Côte d’Azur', "Provence-Alpes-Côte d'Azur"],
    photo: 'photo-1687689796345-33429638a26d',
    alt: 'Panorama urbain de Marseille avec reliefs en arrière-plan',
    credit: 'Satvik / Unsplash',
    source: 'https://unsplash.com/photos/a-view-of-a-large-city-with-mountains-in-the-background-411tbmQSZcM',
  },
  {
    key: 'paris-montmartre',
    regions: ['Île-de-France'],
    fallback: true,
    photo: 'photo-1676409468335-ee752382e931',
    alt: 'Vue urbaine de Paris depuis Montmartre',
    credit: 'Denis / Unsplash',
    source: 'https://unsplash.com/photos/a-large-white-building-with-a-clock-on-its-side-qaM_n2hT0xw',
  },
  {
    key: 'roissy-cdg-airliner',
    slugs: ['cool-roof-roissy', 'cool-roof-tremblay-en-france'],
    departements: ["Val-d'Oise"],
    photo: 'photo-1570657105402-32652cf0045f',
    alt: 'Avion sur la plateforme Roissy-Charles-de-Gaulle à Tremblay-en-France',
    credit: 'Pascal Bernardon / Unsplash',
    source: 'https://unsplash.com/photos/white-airliner-YH7YKZaJguQ',
  },
  {
    key: 'bobigny-metro',
    slugs: ['cool-roof-bobigny'],
    departements: ['Seine-Saint-Denis'],
    photo: 'photo-1502127958155-113755d9bdad',
    alt: 'Architecture de métro à Bobigny',
    credit: 'Julien Andrieux / Unsplash',
    source: 'https://unsplash.com/photos/escalator-in-the-middle-of-tiled-walls-KnAH5pNJ58Y',
  },
  {
    key: 'orly-airport',
    slugs: ['cool-roof-orly'],
    photo: 'photo-1558768998-2e5dcabffd21',
    alt: 'Avion en approche de l’aéroport d’Orly',
    credit: 'Daniel Eledut / Unsplash',
    source: 'https://unsplash.com/photos/flying-white-airplane-rPW5zeDi0EU',
  },
  {
    key: 'val-de-marne-chateau',
    departements: ['Val-de-Marne'],
    photo: 'photo-1716301211661-10ffae9b095d',
    alt: 'Patrimoine architectural du Val-de-Marne',
    credit: 'Pascal Bernardon / Unsplash',
    source: 'https://unsplash.com/photos/a-large-castle-like-building-with-a-flag-on-top-of-it-wiOFye2F7Cs',
  },
  {
    key: 'la-defense-puteaux',
    slugs: ['cool-roof-nanterre', 'cool-roof-rueil', 'cool-roof-gennevilliers'],
    departements: ['Hauts-de-Seine'],
    photo: 'photo-1715960350220-1706c877d245',
    alt: 'Tours de La Défense à Puteaux',
    credit: 'Jametlene Reskp / Unsplash',
    source: 'https://unsplash.com/photos/a-group-of-tall-buildings-in-a-city-lmSJpBNG_60',
  },
  {
    key: 'massy-architecture',
    slugs: ['cool-roof-massy', 'cool-roof-les-ulis', 'cool-roof-courtaboeuf'],
    departements: ['Essonne'],
    photo: 'photo-1525351549016-1ddd272c8315',
    alt: 'Architecture contemporaine à Massy',
    credit: 'Pierre Châtel-Innocenti / Unsplash',
    source: 'https://unsplash.com/photos/architectural-photograph-of-glass-wall-building-tGm0O_ePW6w',
  },
  {
    key: 'versailles-palace',
    departements: ['Yvelines'],
    photo: 'photo-1702726694358-ff33ba5f8de9',
    alt: 'Château de Versailles sous le ciel',
    credit: 'Andrei R. Popescu / Unsplash',
    source: 'https://unsplash.com/photos/a-large-building-with-a-sky-background-hFjkNvZSbFM',
  },
  {
    key: 'poissy-villa-savoye',
    slugs: ['cool-roof-poissy'],
    photo: 'photo-1720643590810-2e9bc4a13c7c',
    alt: 'Villa Savoye à Poissy',
    credit: 'Antoine Gravier / Unsplash',
    source: 'https://unsplash.com/photos/a-large-white-building-sitting-on-top-of-a-lush-green-field-6O-qAZJ-1hc',
  },
  {
    key: 'fontainebleau',
    departements: ['Seine-et-Marne'],
    photo: 'photo-1674160201103-7d66c74c4191',
    alt: 'Château de Fontainebleau',
    credit: 'Chloé Lefleur / Unsplash',
    source: 'https://unsplash.com/photos/a-large-building-with-a-clock-on-the-front-of-it-XszhEeRB7aA',
  },
  {
    key: 'lille-grand-place',
    departements: ['Nord'],
    regions: ['Hauts-de-France'],
    photo: 'photo-1601718748552-fb19929a1d9b',
    alt: 'Grand Place de Lille',
    credit: 'Alexandre Van Thuan / Unsplash',
    source: 'https://unsplash.com/photos/people-walking-on-street-during-daytime-lfFjRLP5D7c',
  },
  {
    key: 'calais-coast',
    slugs: ['cool-roof-calais'],
    departements: ['Pas-de-Calais'],
    photo: 'photo-1668609723569-8b6dbf4a1086',
    alt: 'Plage et littoral de Calais',
    credit: 'Alex Vasey / Unsplash',
    source: 'https://unsplash.com/photos/a-sandy-beach-with-a-body-of-water-in-the-background-CRa6a2KCVNU',
  },
  {
    key: 'rouen-sunset',
    departements: ['Seine-Maritime'],
    regions: ['Normandie'],
    photo: 'photo-1644254923462-b7ac9ea1a1f2',
    alt: 'Vue de Rouen au coucher du soleil',
    credit: 'XAVIER PHOTOGRAPHY / Unsplash',
    source: 'https://unsplash.com/photos/the-sun-is-setting-over-a-large-city-PsEiNpVRPlI',
  },
  {
    key: 'strasbourg-aerial',
    departements: ['Bas-Rhin', 'Haut-Rhin', 'Moselle', 'Meurthe-et-Moselle', 'Marne', 'Aube', 'Ardennes', 'Vosges', 'Haute-Marne'],
    regions: ['Grand Est'],
    photo: 'photo-1745058185953-bc569d88e7b0',
    alt: 'Vue aérienne de Strasbourg et de sa cathédrale',
    credit: 'Thomas Dorgler / Unsplash',
    source: 'https://unsplash.com/photos/aerial-view-of-strasbourg-cathedral-at-sunset-xi170XoT-uo',
  },
  {
    key: 'nantes-aerial',
    departements: ['Loire-Atlantique', 'Mayenne', 'Maine-et-Loire', 'Sarthe', 'Vendée'],
    regions: ['Pays de la Loire'],
    photo: 'photo-1583571985035-2c73e7148fcd',
    alt: 'Vue aérienne de Nantes',
    credit: 'Simon PALLARD / Unsplash',
    source: 'https://unsplash.com/photos/aerial-view-of-city-buildings-during-daytime-rzFYSzC49zE',
  },
  {
    key: 'rennes-place-republique',
    regions: ['Bretagne'],
    photo: 'photo-1724515123376-e728c4d630ea',
    alt: 'Vue urbaine de Rennes depuis la place de la République',
    credit: 'Thanh Ly / Unsplash',
    source: 'https://unsplash.com/photos/a-view-of-a-park-with-a-lot-of-buildings-in-the-background-wM_ILBYarXE',
  },
  {
    key: 'saumur-loire',
    regions: ['Centre-Val de Loire'],
    photo: 'photo-1650869653858-1c2c0768014f',
    alt: 'Château de Saumur et vallée de la Loire',
    credit: 'Andréa Villiers / Unsplash',
    source: 'https://unsplash.com/photos/a-castle-on-a-hill-by-a-river-XB4pciziSCw',
  },
  {
    key: 'bordeaux-waterfront',
    regions: ['Nouvelle-Aquitaine'],
    photo: 'photo-1493564738392-d148cfbd6eda',
    alt: 'Architecture de Bordeaux reflétée sur l’eau',
    credit: 'Juan Di Nella / Unsplash',
    source: 'https://unsplash.com/photos/low-angle-photo-of-white-concrete-building-ulhxvMjzI_4',
  },
  {
    key: 'toulouse-rooftops',
    regions: ['Occitanie'],
    photo: 'photo-1533375954403-dcc42d37d33a',
    alt: 'Toits et centre historique de Toulouse vus en hauteur',
    credit: 'Henrique Ferreira / Unsplash',
    source: 'https://unsplash.com/photos/aerial-photo-of-village-qi2gM5gs40I',
  },
  {
    key: 'dijon-street',
    regions: ['Bourgogne-Franche-Comté'],
    photo: 'photo-1750456793204-f8e7ca7cba63',
    alt: 'Rue historique de Dijon',
    credit: 'Fabian Kleiser / Unsplash',
    source: 'https://unsplash.com/photos/old-buildings-line-a-sunny-street-uJu17oBJNsE',
  },
  {
    key: 'corsica-coast',
    regions: ['Corse'],
    photo: 'photo-1664463684906-507595af60ef',
    alt: 'Littoral et reliefs de Corse',
    credit: 'Tadeja Pavšič / Unsplash',
    source: 'https://unsplash.com/photos/a-body-of-water-with-hills-around-it-YpswzejdYos',
  },
  {
    key: 'brussels-skyline',
    regions: ['Belgique'],
    photo: 'photo-1687734951918-c2be3962f259',
    alt: 'Vue urbaine de Bruxelles',
    credit: 'Hanlin Sun / Unsplash',
    source: 'https://unsplash.com/photos/a-view-of-a-city-from-the-top-of-a-building-qVdJ35mE2GM',
  },
  {
    key: 'geneva-lake',
    regions: ['Suisse'],
    photo: 'photo-1584200463394-bba4b2117e4d',
    alt: 'Vue aérienne de Genève et du lac Léman',
    credit: 'Xavier von Erlach / Unsplash',
    source: 'https://unsplash.com/photos/aerial-view-of-city-buildings-near-body-of-water-during-daytime-yEsQzAhDKQs',
  },
];

// Banque d'images stock gratuites. Toutes les sources sont des pages Unsplash "Free to use under the Unsplash License".
const STOCK_IMAGES: StockAsset[] = [
  {
    key: 'white-industrial-rooftops',
    categories: ['hero', 'roof', 'industrial', 'tertiaire', 'commercial', 'generic'],
    photo: 'photo-1479356558243-f9d175b1abea',
    alt: 'Toitures industrielles claires vues par drone',
    credit: 'Jason Schuller / Unsplash',
    source: 'https://unsplash.com/photos/a-drone-shot-of-white-industrial-buildings-iWNxNHEQZHc',
  },
  {
    key: 'warehouse-aerial',
    categories: ['hero', 'roof', 'logistics', 'generic'],
    photo: 'photo-1715026323282-073e1a65576a',
    alt: 'Grand bâtiment logistique vu du ciel',
    credit: 'Geoffrey Moffett / Unsplash',
    source: 'https://unsplash.com/photos/an-aerial-view-of-a-large-warehouse-building-Cqj-P2NHZ-c',
  },
  {
    key: 'logistics-yard',
    categories: ['hero', 'activity', 'logistics', 'industrial'],
    photo: 'photo-1565891741441-64926e441838',
    alt: 'Zone logistique avec quais et camions vue du ciel',
    credit: 'Marcin Jozwiak / Unsplash',
    source: 'https://unsplash.com/photos/aerial-view-of-vehicles-in-parking-area-oh0DITWoHi4',
  },
  {
    key: 'parked-trucks',
    categories: ['activity', 'logistics', 'distribution'],
    photo: 'photo-1565793298595-6a879b1d9492',
    alt: 'Camions stationnés sur une plateforme logistique',
    credit: 'Marcin Jozwiak / Unsplash',
    source: 'https://unsplash.com/photos/parked-trucks-kGoPcmpPT7c',
  },
  {
    key: 'yellow-containers',
    categories: ['activity', 'logistics', 'distribution'],
    photo: 'photo-1565742863375-85d007f0ad40',
    alt: 'Conteneurs et remorques dans une zone de distribution',
    credit: 'Marcin Jozwiak / Unsplash',
    source: 'https://unsplash.com/photos/yellow-and-white-containers-l5plFZq7E28',
  },
  {
    key: 'container-yard',
    categories: ['hero', 'activity', 'port', 'logistics'],
    photo: 'photo-1494412519320-aa613dfb7738',
    alt: 'Parc de conteneurs portuaire vu du ciel',
    credit: 'CHUTTERSNAP / Unsplash',
    source: 'https://unsplash.com/photos/aerial-view-of-shipping-container-yard-9cCeS9Sg6nU',
  },
  {
    key: 'cargo-crates',
    categories: ['activity', 'port'],
    photo: 'photo-1494412651409-8963ce7935a7',
    alt: 'Conteneurs de fret et grues portuaires vus du ciel',
    credit: 'CHUTTERSNAP / Unsplash',
    source: 'https://unsplash.com/photos/aerial-photo-of-cargo-crates-fN603qcEA7g',
  },
  {
    key: 'intermodal-dock',
    categories: ['activity', 'port', 'logistics'],
    photo: 'photo-1494412574643-ff11b0a5c1c3',
    alt: 'Terminal intermodal avec conteneurs sur quai',
    credit: 'CHUTTERSNAP / Unsplash',
    source: 'https://unsplash.com/photos/intermodal-containers-on-dock-eqwFWHfQipg',
  },
  {
    key: 'industrial-tanks',
    categories: ['hero', 'activity', 'industrial', 'chemistry', 'energy', 'pharma', 'tech'],
    photo: 'photo-1722839334701-e1cf40640791',
    alt: 'Installations techniques et cuves sur un site industriel',
    credit: 'un LIU / Unsplash',
    source: 'https://unsplash.com/photos/an-aerial-view-of-a-factory-with-many-tanks-k8nppQa5s48',
  },
  {
    key: 'airport-aerial',
    categories: ['hero', 'activity', 'airport', 'aerospace'],
    photo: 'photo-1544975331-f15ed1a1c28f',
    alt: 'Aéroport et pistes vus depuis les airs',
    credit: 'Miguel Angel Sanz / Unsplash',
    source: 'https://unsplash.com/photos/aerial-view-photography-of-airport-yXE0zybDr-I',
  },
  {
    key: 'airport-runway',
    categories: ['activity', 'airport', 'aerospace'],
    photo: 'photo-1503412345334-7d4ca6c34f61',
    alt: 'Piste aéroportuaire sous un ciel clair',
    credit: 'Brent Cox / Unsplash',
    source: 'https://unsplash.com/photos/airplane-road-under-cumulus-clouds-gxvYZk4Fwjk',
  },
  {
    key: 'rail-logistics',
    categories: ['activity', 'rail', 'logistics'],
    photo: 'photo-1616765755946-d944b3d391c0',
    alt: 'Hub logistique ferroviaire vu par drone',
    credit: 'Marcin Jozwiak / Unsplash',
    source: 'https://unsplash.com/photos/white-and-blue-train-on-rail-sED6MlaoNHk',
  },
  {
    key: 'night-port',
    categories: ['activity', 'port'],
    photo: 'photo-1508404999913-79a3a2e75437',
    alt: 'Port industriel et navires vus de nuit',
    credit: 'CHUTTERSNAP / Unsplash',
    source: 'https://unsplash.com/photos/aerial-photography-of-port-M3yYOCob6kE',
  },
];

function hashStr(s: string): number {
  let h = 2166136261 >>> 0;
  for (let i = 0; i < s.length; i++) {
    h ^= s.charCodeAt(i);
    h = Math.imul(h, 16777619) >>> 0;
  }
  return h;
}

function zoneSeed(zone: ZoneData): string {
  return zone.slugVille ?? zone.slugDepartement ?? zone.slugRegion ?? zoneName(zone) ?? 'local-seo';
}

function sectorCategory(label: string): string {
  const t = (label || '').toLowerCase();
  if (/a[ée]roport|tarmac|a[ée]ronaut|spatial|d[ée]fense/.test(t)) return 'airport';
  if (/portuaire|maritime|port\b/.test(t)) return 'port';
  if (/ferroviaire|rail/.test(t)) return 'rail';
  if (/chimie|p[ée]tro|pharma|cosm[ée]|nucl[ée]aire|[ée]nerg/.test(t)) return 'chemistry';
  if (/tech|r&d|r-d|[ée]lectro|semi|microtech|data|horlog/.test(t)) return 'tech';
  if (/commerce|distribution|logistiqu|entrep|fret|messagerie|e-commerce/.test(t)) return 'logistics';
  if (/tertiaire|bureau|service|pmi|pme/.test(t)) return 'tertiaire';
  if (/industri|m[ée]tallurg|m[ée]canique|plasturg|sid[ée]rurg|automobile|textile|agro/.test(t)) return 'industrial';
  return 'generic';
}

function primaryZoneCategory(zone: ZoneData): string {
  return sectorCategory(zone.typeZone);
}

function pickAsset(categories: string[], seed: string, salt: number): StockAsset {
  const candidates = STOCK_IMAGES.filter((asset) => categories.every((category) => asset.categories.includes(category)));
  const fallbackCategory = categories[categories.length - 1];
  const fallback = STOCK_IMAGES.filter((asset) => asset.categories.includes(fallbackCategory));
  const pool = candidates.length
    ? candidates
    : fallback.length
      ? fallback
      : STOCK_IMAGES.filter((asset) => asset.categories.includes('generic'));
  return pool[(hashStr(`${seed}:${salt}:${categories.join('|')}`) % pool.length)];
}

function toMedia(asset: Pick<StockAsset, 'photo' | 'alt' | 'credit' | 'source'>, altContext: string, width = 1800): LocalSeoMedia {
  return {
    src: unsplashImage(asset.photo, width),
    alt: `${asset.alt} - ${altContext}`,
    credit: asset.credit,
    source: asset.source,
  };
}

function findGeoHeroAsset(zone: ZoneData): GeoHeroAsset | undefined {
  const slug = zoneSeed(zone);
  return (
    GEO_HERO_IMAGES.find((asset) => asset.slugs?.includes(slug)) ??
    GEO_HERO_IMAGES.find((asset) => asset.departements?.includes(zone.departementNom)) ??
    GEO_HERO_IMAGES.find((asset) => asset.regions?.includes(zone.region)) ??
    GEO_HERO_IMAGES.find((asset) => asset.fallback)
  );
}

export function buildLocalMetaTitle(zone: ZoneData): string {
  if (zone.pageType === 'ville') {
    const city = zone.ville ?? zoneName(zone);
    return `Cool roof ${city} : application de peinture réfléchissante`;
  }

  if (zone.pageType === 'departement') {
    return `Cool roof ${zone.departementNom} : application de peinture réfléchissante`;
  }

  return `Cool roof ${zone.region} : peinture réfléchissante`;
}

export function buildLocalMetaDescription(zone: ZoneData): string {
  if (zone.pageType === 'ville') {
    const city = zone.ville ?? zoneName(zone);
    return `Application de peinture cool roof haut de gamme ${villeInPhrase(city)} : toiture industrielle, entrepôt, atelier ou tertiaire. Diagnostic Covalba sous 48h.`;
  }

  if (zone.pageType === 'departement') {
    return `Plan cool roof ${departementInPhrase(zone.departementNom)} : sélection des sites prioritaires, réseau d'applicateurs et peinture réfléchissante durable. Estimation 48h.`;
  }

  return `Déploiement cool roof en ${zone.region} : peinture réfléchissante haut de gamme pour toitures professionnelles, diagnostic et estimation Covalba sous 48h.`;
}

export function buildLocalHeroCopy(zone: ZoneData): { title: string; subtitle: string; ctaTitle: string } {
  if (zone.pageType === 'ville') {
    const city = zone.ville ?? zoneName(zone);
    return {
      title: `Cool roof ${villeInPhrase(city)} : application de peinture réfléchissante haut de gamme`,
      subtitle: `Diagnostic local sur les entrepôts, ateliers et bâtiments tertiaires ${villeInPhrase(city)} : Covalba traite les toitures exposées sans interrompre l'activité.`,
      ctaTitle: `Votre toiture ${villeInPhrase(city)} mérite une solution qui dure`,
    };
  }

  if (zone.pageType === 'departement') {
    const deptPhrase = departementInPhrase(zone.departementNom);
    return {
      title: `Cool roof ${deptPhrase} : déploiement départemental de peinture réfléchissante`,
      subtitle: `Un plan d'intervention à l'échelle du ${zone.departementNum} : priorisation des zones d'activité, applicateurs agréés et estimation par typologie de toiture.`,
      ctaTitle: `Vos toitures ${deptPhrase} méritent un plan cool roof durable`,
    };
  }

  return {
    title: `Cool roof en ${zone.region} : peinture réfléchissante haut de gamme`,
    subtitle: `Covalba coordonne son réseau d'applicateurs sur toute la région pour protéger les toitures industrielles, logistiques et tertiaires.`,
    ctaTitle: `Vos toitures en ${zone.region} méritent une solution qui dure`,
  };
}

const coolRoofCrumb = (name: string): string => `Cool Roof ${name}`;

function regionCrumbName(zone: ZoneData): string {
  if (zone.pays === 'CH') return 'Suisse';
  if (zone.pays === 'BE') return 'Belgique';
  return zone.region;
}

export function buildLocalBreadcrumbItems(zone: ZoneData): LocalBreadcrumbItem[] {
  const items: LocalBreadcrumbItem[] = [{ label: 'Accueil', href: '/' }];
  const regionName = regionCrumbName(zone);

  if (zone.pageType === 'region') {
    items.push({ label: coolRoofCrumb(regionName) });
    return items;
  }

  if (zone.slugRegion) {
    items.push({ label: coolRoofCrumb(regionName), href: `/${zone.slugRegion}` });
  }

  const hasDistinctDepartment =
    Boolean(zone.slugDepartement) &&
    zone.slugDepartement !== zone.slugRegion &&
    Boolean(zone.departementNom);

  if (zone.pageType === 'departement') {
    items.push({ label: coolRoofCrumb(zone.departementNom) });
    return items;
  }

  if (hasDistinctDepartment) {
    items.push({ label: coolRoofCrumb(zone.departementNom), href: `/${zone.slugDepartement}` });
  }

  items.push({ label: coolRoofCrumb(zone.ville ?? zoneName(zone)) });
  return items;
}

export function getHeroMedia(zone: ZoneData): LocalSeoMedia {
  const asset = findGeoHeroAsset(zone) ?? pickAsset(['hero', primaryZoneCategory(zone)], zoneSeed(zone), 1);
  const context =
    zone.pageType === 'ville'
      ? `hero cool roof ${villeInPhrase(zone.ville ?? zoneName(zone))}`
      : `hero cool roof ${zoneInPhrase(zone)}`;
  return toMedia(asset, context, 2000);
}

export function getSectorMedia(label: string, zone: ZoneData, index: number): LocalSeoMedia {
  const category = sectorCategory(label);
  const asset = pickAsset(['activity', category], zoneSeed(zone), index + 11);
  const context = `${label.toLowerCase()} ${zoneInterventionPhrase(zone)}`;
  return toMedia(asset, context, 1400);
}

export function getStockMediaCredits(): Array<Pick<StockAsset, 'key' | 'credit' | 'source'>> {
  return [...GEO_HERO_IMAGES, ...STOCK_IMAGES].map(({ key, credit, source }) => ({ key, credit, source }));
}
