/**
 * Fontes que o lojista pode escolher na personalizacao avancada.
 *
 * A CHAVE de cada fonte e gravada no banco (`catalog_font_heading` e
 * `catalog_font_body`). Nunca renomeie uma chave sem migrar os dados: a loja
 * que a usava cairia no padrao silenciosamente.
 *
 * ESTE ARQUIVO E GERADO. A lista vive em scripts/gen_fonts.py e escreve os
 * dois lados de uma vez (public e admin), justamente para as chaves nao
 * divergirem entre o seletor do admin e a vitrine que aplica a fonte.
 *
 * Nada de next/font/google aqui: ele baixava as 65 familias do Google durante
 * o build, e o deploy caia quando o Google mudava o formato do endereco. A
 * previa do seletor pede as fontes ao Google no navegador, pela folha
 * HREF_DAS_FONTES_DO_SELETOR, igual a vitrine faz com a dupla da loja. A
 * folha so declara as fontes; o navegador baixa o arquivo de cada uma apenas
 * quando a lista aberta desenha aquele nome.
 */

/**
 * Cabecalho de grupo (nao selecionavel) ou uma fonte de verdade.
 *
 * O campo `tipo` e obrigatorio nos dois lados de proposito: e ele que deixa o
 * TypeScript estreitar a uniao. Com um campo opcional o compilador nao
 * consegue separar os dois casos e o `label` vira erro.
 */
export type CatalogFontOption =
  | { tipo: "grupo"; label: string }
  | { tipo: "fonte"; key: string; label: string; fontFamily: string };

/** A folha do Google com as 65 familias, nos pesos que o seletor desenha. */
export const HREF_DAS_FONTES_DO_SELETOR =
  "https://fonts.googleapis.com/css2?family=Fraunces:wght@400;500&family=Playfair+Display:wght@400;500&family=Instrument+Serif:wght@400&family=Lora:wght@400;500&family=EB+Garamond:wght@400;500&family=Cormorant+Garamond:wght@400;500&family=Libre+Baskerville:wght@400&family=Crimson+Pro:wght@400;500&family=Merriweather:wght@400&family=Source+Serif+4:wght@400;500&family=Spectral:wght@400;500&family=Newsreader:wght@400;500&family=Literata:wght@400;500&family=DM+Serif+Display:wght@400&family=Bodoni+Moda:wght@400;500&family=Marcellus:wght@400&family=Syne:wght@400;500&family=Unbounded:wght@400;500&family=Anton:wght@400&family=Bebas+Neue:wght@400&family=Archivo+Black:wght@400&family=Abril+Fatface:wght@400&family=Alfa+Slab+One:wght@400&family=Righteous:wght@400&family=Darker+Grotesque:wght@400;500&family=Bricolage+Grotesque:wght@400;500&family=Space+Grotesk:wght@400;500&family=Sora:wght@400;500&family=Manrope:wght@400;500&family=DM+Sans:wght@400;500&family=Outfit:wght@400;500&family=Figtree:wght@400;500&family=Epilogue:wght@400;500&family=Work+Sans:wght@400;500&family=Inter:wght@400;500&family=Plus+Jakarta+Sans:wght@400;500&family=Urbanist:wght@400;500&family=Jost:wght@400;500&family=Lexend:wght@400;500&family=Albert+Sans:wght@400;500&family=Onest:wght@400;500&family=Schibsted+Grotesk:wght@400;500&family=Hanken+Grotesk:wght@400;500&family=Archivo:wght@400;500&family=Poppins:wght@400;500&family=Montserrat:wght@400;500&family=Raleway:wght@400;500&family=Nunito:wght@400;500&family=Nunito+Sans:wght@400;500&family=Rubik:wght@400;500&family=Karla:wght@400;500&family=Lato:wght@400&family=Open+Sans:wght@400;500&family=Roboto:wght@400;500&family=Source+Sans+3:wght@400;500&family=Quicksand:wght@400;500&family=JetBrains+Mono:wght@400;500&family=IBM+Plex+Mono:wght@400;500&family=Space+Mono:wght@400&family=Roboto+Mono:wght@400;500&family=Caveat:wght@400;500&family=Dancing+Script:wght@400;500&family=Pacifico:wght@400&family=Sacramento:wght@400&family=Great+Vibes:wght@400&display=swap";

export const CATALOG_FONT_OPTIONS: CatalogFontOption[] = [
  { tipo: "grupo", label: "Serifadas e editoriais" },
  { tipo: "fonte", key: "fraunces", label: "Fraunces — serifada com personalidade", fontFamily: '"Fraunces", serif' },
  { tipo: "fonte", key: "playfair-display", label: "Playfair Display — editorial clássica", fontFamily: '"Playfair Display", serif' },
  { tipo: "fonte", key: "instrument-serif", label: "Instrument Serif — serifada enxuta", fontFamily: '"Instrument Serif", serif' },
  { tipo: "fonte", key: "lora", label: "Lora — leitura confortável", fontFamily: '"Lora", serif' },
  { tipo: "fonte", key: "eb-garamond", label: "EB Garamond — clássica atemporal", fontFamily: '"EB Garamond", serif' },
  { tipo: "fonte", key: "cormorant-garamond", label: "Cormorant Garamond — refinada e fina", fontFamily: '"Cormorant Garamond", serif' },
  { tipo: "fonte", key: "libre-baskerville", label: "Libre Baskerville — livro tradicional", fontFamily: '"Libre Baskerville", serif' },
  { tipo: "fonte", key: "crimson-pro", label: "Crimson Pro — humanista elegante", fontFamily: '"Crimson Pro", serif' },
  { tipo: "fonte", key: "merriweather", label: "Merriweather — robusta e legível", fontFamily: '"Merriweather", serif' },
  { tipo: "fonte", key: "source-serif-4", label: "Source Serif — técnica com serifa", fontFamily: '"Source Serif 4", serif' },
  { tipo: "fonte", key: "spectral", label: "Spectral — serifada contemporânea", fontFamily: '"Spectral", serif' },
  { tipo: "fonte", key: "newsreader", label: "Newsreader — jornalística", fontFamily: '"Newsreader", serif' },
  { tipo: "fonte", key: "literata", label: "Literata — editorial moderna", fontFamily: '"Literata", serif' },
  { tipo: "fonte", key: "dm-serif-display", label: "DM Serif Display — títulos de alto contraste", fontFamily: '"DM Serif Display", serif' },
  { tipo: "fonte", key: "bodoni-moda", label: "Bodoni Moda — luxo e moda", fontFamily: '"Bodoni Moda", serif' },
  { tipo: "fonte", key: "marcellus", label: "Marcellus — romana sofisticada", fontFamily: '"Marcellus", serif' },
  { tipo: "grupo", label: "Display e impacto" },
  { tipo: "fonte", key: "syne", label: "Syne — display marcante", fontFamily: '"Syne", sans-serif' },
  { tipo: "fonte", key: "unbounded", label: "Unbounded — geométrica forte", fontFamily: '"Unbounded", sans-serif' },
  { tipo: "fonte", key: "anton", label: "Anton — condensada de alto impacto", fontFamily: '"Anton", sans-serif' },
  { tipo: "fonte", key: "bebas-neue", label: "Bebas Neue — caixa alta esportiva", fontFamily: '"Bebas Neue", sans-serif' },
  { tipo: "fonte", key: "archivo-black", label: "Archivo Black — peso máximo", fontFamily: '"Archivo Black", sans-serif' },
  { tipo: "fonte", key: "abril-fatface", label: "Abril Fatface — cartaz clássico", fontFamily: '"Abril Fatface", sans-serif' },
  { tipo: "fonte", key: "alfa-slab-one", label: "Alfa Slab One — serifa pesada", fontFamily: '"Alfa Slab One", sans-serif' },
  { tipo: "fonte", key: "righteous", label: "Righteous — retrô arredondada", fontFamily: '"Righteous", sans-serif' },
  { tipo: "fonte", key: "darker-grotesque", label: "Darker Grotesque — condensada alternativa", fontFamily: '"Darker Grotesque", sans-serif' },
  { tipo: "grupo", label: "Sans modernas" },
  { tipo: "fonte", key: "bricolage-grotesque", label: "Bricolage Grotesque — contemporânea", fontFamily: '"Bricolage Grotesque", sans-serif' },
  { tipo: "fonte", key: "space-grotesk", label: "Space Grotesk — técnica", fontFamily: '"Space Grotesk", sans-serif' },
  { tipo: "fonte", key: "sora", label: "Sora — moderna equilibrada", fontFamily: '"Sora", sans-serif' },
  { tipo: "fonte", key: "manrope", label: "Manrope — limpa e arredondada", fontFamily: '"Manrope", sans-serif' },
  { tipo: "fonte", key: "dm-sans", label: "DM Sans — neutra elegante", fontFamily: '"DM Sans", sans-serif' },
  { tipo: "fonte", key: "outfit", label: "Outfit — geométrica leve", fontFamily: '"Outfit", sans-serif' },
  { tipo: "fonte", key: "figtree", label: "Figtree — amigável", fontFamily: '"Figtree", sans-serif' },
  { tipo: "fonte", key: "epilogue", label: "Epilogue — contrastada", fontFamily: '"Epilogue", sans-serif' },
  { tipo: "fonte", key: "work-sans", label: "Work Sans — versátil", fontFamily: '"Work Sans", sans-serif' },
  { tipo: "fonte", key: "inter", label: "Inter — padrão de interface", fontFamily: '"Inter", sans-serif' },
  { tipo: "fonte", key: "plus-jakarta-sans", label: "Plus Jakarta Sans — sofisticada", fontFamily: '"Plus Jakarta Sans", sans-serif' },
  { tipo: "fonte", key: "urbanist", label: "Urbanist — geométrica minimalista", fontFamily: '"Urbanist", sans-serif' },
  { tipo: "fonte", key: "jost", label: "Jost — inspirada na Futura", fontFamily: '"Jost", sans-serif' },
  { tipo: "fonte", key: "lexend", label: "Lexend — foco em legibilidade", fontFamily: '"Lexend", sans-serif' },
  { tipo: "fonte", key: "albert-sans", label: "Albert Sans — geométrica suave", fontFamily: '"Albert Sans", sans-serif' },
  { tipo: "fonte", key: "onest", label: "Onest — neutra atual", fontFamily: '"Onest", sans-serif' },
  { tipo: "fonte", key: "schibsted-grotesk", label: "Schibsted Grotesk — editorial digital", fontFamily: '"Schibsted Grotesk", sans-serif' },
  { tipo: "fonte", key: "hanken-grotesk", label: "Hanken Grotesk — grotesca amigável", fontFamily: '"Hanken Grotesk", sans-serif' },
  { tipo: "fonte", key: "archivo", label: "Archivo — grotesca de alto desempenho", fontFamily: '"Archivo", sans-serif' },
  { tipo: "grupo", label: "Sans clássicas" },
  { tipo: "fonte", key: "poppins", label: "Poppins — geométrica popular", fontFamily: '"Poppins", sans-serif' },
  { tipo: "fonte", key: "montserrat", label: "Montserrat — urbana e conhecida", fontFamily: '"Montserrat", sans-serif' },
  { tipo: "fonte", key: "raleway", label: "Raleway — elegante e fina", fontFamily: '"Raleway", sans-serif' },
  { tipo: "fonte", key: "nunito", label: "Nunito — arredondada acolhedora", fontFamily: '"Nunito", sans-serif' },
  { tipo: "fonte", key: "nunito-sans", label: "Nunito Sans — versão sóbria", fontFamily: '"Nunito Sans", sans-serif' },
  { tipo: "fonte", key: "rubik", label: "Rubik — cantos suaves", fontFamily: '"Rubik", sans-serif' },
  { tipo: "fonte", key: "karla", label: "Karla — grotesca compacta", fontFamily: '"Karla", sans-serif' },
  { tipo: "fonte", key: "lato", label: "Lato — corporativa clássica", fontFamily: '"Lato", sans-serif' },
  { tipo: "fonte", key: "open-sans", label: "Open Sans — neutra universal", fontFamily: '"Open Sans", sans-serif' },
  { tipo: "fonte", key: "roboto", label: "Roboto — padrão do Android", fontFamily: '"Roboto", sans-serif' },
  { tipo: "fonte", key: "source-sans-3", label: "Source Sans — limpa e técnica", fontFamily: '"Source Sans 3", sans-serif' },
  { tipo: "fonte", key: "quicksand", label: "Quicksand — leve e arredondada", fontFamily: '"Quicksand", sans-serif' },
  { tipo: "grupo", label: "Monoespaçadas" },
  { tipo: "fonte", key: "jetbrains-mono", label: "JetBrains Mono — monoespaçada moderna", fontFamily: '"JetBrains Mono", monospace' },
  { tipo: "fonte", key: "ibm-plex-mono", label: "IBM Plex Mono — técnica corporativa", fontFamily: '"IBM Plex Mono", monospace' },
  { tipo: "fonte", key: "space-mono", label: "Space Mono — retrô futurista", fontFamily: '"Space Mono", monospace' },
  { tipo: "fonte", key: "roboto-mono", label: "Roboto Mono — monoespaçada neutra", fontFamily: '"Roboto Mono", monospace' },
  { tipo: "grupo", label: "Manuscritas" },
  { tipo: "fonte", key: "caveat", label: "Caveat — manuscrita espontânea", fontFamily: '"Caveat", cursive' },
  { tipo: "fonte", key: "dancing-script", label: "Dancing Script — caligráfica alegre", fontFamily: '"Dancing Script", cursive' },
  { tipo: "fonte", key: "pacifico", label: "Pacifico — script descontraída", fontFamily: '"Pacifico", cursive' },
  { tipo: "fonte", key: "sacramento", label: "Sacramento — fina e delicada", fontFamily: '"Sacramento", cursive' },
  { tipo: "fonte", key: "great-vibes", label: "Great Vibes — caligrafia formal", fontFamily: '"Great Vibes", cursive' },
];
