/* eslint-disable */
// i18n strings for ARHIVAR — Romanian primary, English secondary

const STRINGS = {
  ro: {
    // nav
    nav_features: "Funcționalități",
    nav_insights: "Statistici",
    nav_pricing: "Tarife",
    nav_faq: "Întrebări",
    nav_signin: "Intră în cont",
    nav_demo: "Vezi demo",

    // hero
    hero_eyebrow: "Conformitate fiscală · ANAF e-Factura",
    hero_h1_a: "Arhiva ta de e-Facturi.",
    hero_h1_em: "Pe pilot automat.",
    hero_h1_b: "6 ani.",
    hero_lede: "Autorizezi o singură dată. ARHIVAR descarcă zilnic din SPV-ul ANAF, arhivează semnat fiecare factură și îți generează statistici lunare clare. Tu te uiți doar când vrei.",
    hero_cta_primary: "Începe gratuit",
    hero_cta_secondary: "Vezi dashboard-ul",
    hero_meta_1: "Conform OUG 120/2021",
    hero_meta_2: "Arhivare semnată digital",
    hero_meta_3: "Multi-firmă, fără limită",

    // how it works
    how_eyebrow: "Cum funcționează",
    how_title: "Trei pași. Apoi nu te mai gândești la asta.",
    how_step1_t: "Autorizezi în SPV",
    how_step1_p: "Conectezi una sau mai multe firme prin OAuth ANAF. Durează două minute. Poți revoca oricând.",
    how_step2_t: "ARHIVAR descarcă tot",
    how_step2_p: "Sincronizare zilnică din SPV — facturi primite și emise, mesaje ANAF, anexe XML și PDF. Nimic nu se pierde.",
    how_step3_t: "Primești statistici și arhive",
    how_step3_p: "La fiecare început de lună: arhivă lunară semnată, raport TVA, top furnizori, alerte de praguri. Totul disponibil 6 ani.",

    // features
    features_eyebrow: "Funcționalități",
    features_title: "Conceput pentru contabilii care nu vor să sune la ANAF.",
    f1_t: "Multi-firmă",
    f1_p: "Comutator instant între companii. Permisiuni granulare pe rol. Util pentru contabili externi cu zeci de clienți.",
    f2_t: "Arhivare conformă 6 ani",
    f2_p: "Fiecare XML primește marcă temporală RFC 3161 + semnătură. Verificabil cu orice client compatibil eIDAS.",
    f3_t: "Statistici care contează",
    f3_p: "Cashflow, top furnizori, categorii de cheltuieli, anomalii detectate automat. Nu doar liste de PDF-uri.",
    f4_t: "Export lunar automat",
    f4_p: "După cele 5 zile de grație e-Factura primești pachetul lunii precedente: ZIP semnat, manifest XML, raport TVA, integrabil cu Saga / SmartBill.",
    f5_t: "Alerte și praguri",
    f5_p: "Setezi praguri pe furnizor sau categorie. Te anunțăm înainte să depășești bugetul lunar.",
    f6_t: "ANAF & SPV nativ",
    f6_p: "Folosim API-urile oficiale. Fără scraping, fără magie. Dacă pică SPV-ul, vezi exact ce a picat și de ce.",

    // insights showcase
    insights_eyebrow: "Statistici care îți spun ceva",
    insights_title: "Datele tale de facturare, citibile dintr-o privire.",
    insights_p: "Banca îți arată tranzacții. Contabilul îți arată decont. ARHIVAR îți arată tipare — cui plătești cel mai mult, ce categorii cresc, când ai depășit ultimul prag.",

    // compliance
    comp_title: "Conformitate, nu compromisuri.",
    comp_p: "OUG 120/2021 și Legea contabilității cer arhivare 6 ani pentru e-Factura. ARHIVAR face exact asta — cu semnătură RFC 3161, redundanță geografică în UE și certificare ISO 27001. Dacă te controlează ANAF, deschizi un link și gata.",
    comp_k1: "6 ani", comp_l1: "Retenție garantată prin contract",
    comp_k2: "RFC 3161", comp_l2: "Marcă temporală pe fiecare factură",
    comp_k3: "ISO 27001", comp_l3: "Securitate informațională certificată",
    comp_k4: "UE", comp_l4: "Date stocate exclusiv în Uniunea Europeană",

    // pricing
    pricing_eyebrow: "Tarife",
    pricing_title: "Simplu. Pe firmă. Fără surprize.",
    p1_name: "Solo", p1_price: "0", p1_d: "RON / firmă / lună", p1_sub: "Pentru o singură firmă mică.",
    p2_name: "Profesional", p2_price: "49", p2_d: "RON / firmă / lună", p2_sub: "Pentru SRL-uri active și contabili cu 2–10 clienți.",
    p3_name: "Birou contabil", p3_price: "Contact", p3_d: "preț pe volum", p3_sub: "Pentru contabili cu 10+ firme. Permisiuni, white-label, API.",
    p_cta_free: "Începe gratuit", p_cta_pro: "Începe cu Profesional", p_cta_ent: "Contactează-ne",
    p1_l1: "1 firmă · 200 facturi/lună", p1_l2: "Arhivare 6 ani, semnată", p1_l3: "Dashboard de bază", p1_l4: "Export lunar manual",
    p2_l1: "10 firme · facturi nelimitate*", p2_l2: "Tot din Solo, plus:", p2_l3: "Statistici complete · alerte praguri", p2_l4: "Export lunar automat · API · SmartBill / Saga", p2_l5: "Suport prioritar pe email",
    p3_l1: "Firme nelimitate", p3_l2: "Permisiuni granulare pe rol", p3_l3: "White-label opțional", p3_l4: "SLA 99.9% · Account manager dedicat",

    // FAQ
    faq_eyebrow: "Întrebări frecvente",
    faq_title: "Răspunsuri scurte.",
    faq_q1: "Trebuie să schimb softul de contabilitate?",
    faq_a1: "Nu. ARHIVAR stă peste SPV-ul ANAF. Continui să folosești Saga, SmartBill, Contabilo, NextUp — orice. Doar primești o arhivă curată în plus.",
    faq_q2: "Ce date colectați?",
    faq_a2: "Doar e-Facturile tale primite și emise prin SPV, mesajele ANAF aferente și informații de contact ale firmei. Nu accesăm conturi bancare, nu citim alte fluxuri.",
    faq_q3: "Ce se întâmplă dacă închid contul?",
    faq_a3: "Primești un ZIP final cu toate facturile semnate, plus manifestul XML pentru verificare independentă. Ai 90 de zile să descarci, apoi se șterg de pe serverele noastre.",
    faq_q4: "De ce 6 ani și nu 10?",
    faq_a4: "Pentru că OUG 120/2021 art. 3 menționează 6 ani pentru e-Factura. Dacă activitatea ta cere 10 (factură fiscală clasică), îți păstrăm și-așa — ai opțiunea în Setări.",
    faq_q5: "Pot autoriza firme cu CUI cu prefix RO și fără?",
    faq_a5: "Da, ambele. Sistemul detectează automat plătitorii de TVA și separă pragurile corespunzător.",
    faq_q6: "Există API?",
    faq_a6: "Da, pe planurile Profesional și Birou contabil. REST + webhook-uri pentru sincronizare cu propriile sisteme.",

    // footer
    foot_product: "Produs", foot_company: "Companie", foot_legal: "Legal",
    foot_features: "Funcționalități", foot_pricing: "Tarife", foot_changelog: "Schimbări",
    foot_about: "Despre noi", foot_contact: "Contact", foot_blog: "Blog",
    foot_terms: "Termeni", foot_privacy: "Confidențialitate", foot_dpa: "Acord prelucrare date",
    foot_copy: "© 2026 ARHIVAR",
    foot_lede: "Arhivă conformă pentru e-Factura. Făcută în Iași.",

    // dashboard sidebar
    s_dash: "Panou principal",
    s_companies: "Companii",
    s_invoices: "Facturi",
    s_anaf: "Mesaje ANAF",
    s_suppliers: "Furnizori",
    s_stats: "Statistici",
    s_exports: "Exporturi",
    s_notif: "Notificări",
    s_settings: "Setări",
    s_admin: "Administrare",
    s_main: "Principal",
    s_data: "Date",
    s_account: "Cont",

    // dashboard content
    d_greeting: "Bună ziua,",
    d_subtitle: "Iată ce s-a întâmplat în arhiva ta în ultimele 30 de zile.",
    d_add_company: "Adaugă companie",
    d_export_month: "Exportă luna",

    kpi_received: "Facturi primite",
    kpi_issued: "Facturi emise",
    kpi_tva: "TVA de plată",
    kpi_archive: "Arhivă",

    cashflow_t: "Cashflow lunar",
    cashflow_s: "Intrări vs ieșiri, ultimele 6 luni · RON",
    cats_t: "Cheltuieli pe categorii",
    cats_s: "Mai 2026",
    supp_t: "Top furnizori",
    supp_s: "Ultimele 30 de zile",
    rec_t: "Facturi recente",
    rec_s: "Ultimele documente arhivate din SPV",
    rec_all: "Toate",
    mon_t: "Monitorizare",
    mon_companies: "Companii", mon_authorized: "Autorizate", mon_thresholds: "Praguri depășite", mon_unread: "Notificări necitite",
    usage_t: "Utilizare arhivă",
    usage_invoices_archived: "facturi arhivate",
    usage_limit: "Limită operațională: 5 GB/an/firmă. Facturile rămân nelimitate în limite rezonabile.",
    usage_export_note: "Exportul lunar se generează după cele 5 zile de grație e-Factura.",

    legend_in: "Intrări", legend_out: "Ieșiri",
    inv_status_received: "Primită", inv_status_issued: "Emisă", inv_status_paid: "Plătită", inv_status_pending: "În așteptare",

    // companies page
    c_title: "Companii autorizate",
    c_sub: "Firmele pentru care ARHIVAR descarcă și arhivează automat.",
    c_th_name: "Companie", c_th_cui: "CUI", c_th_status: "Status", c_th_invoices: "Facturi", c_th_last: "Ultima sincronizare", c_th_action: "",
    c_status_active: "Activă", c_status_pending: "În autorizare", c_status_error: "Eroare token",

    // invoices page
    i_title: "Facturi",
    i_sub: "Toate documentele arhivate din SPV.",
    i_filter_all: "Toate", i_filter_in: "Primite", i_filter_out: "Emise",
    i_th_partner: "Partener", i_th_no: "Număr", i_th_date: "Data", i_th_amount: "Sumă", i_th_tva: "TVA", i_th_status: "Status",

    // stats
    st_title: "Statistici",
    st_sub: "Pattern-uri din ce intră și iese pe firmă.",
    st_period: "Perioadă",
    st_period_30: "30 de zile", st_period_90: "90 de zile", st_period_year: "Anul curent",

    // exports
    e_title: "Exporturi lunare",
    e_sub: "Arhive semnate digital. Disponibile 6 ani.",
    e_download: "Descarcă",
    e_status_ready: "Pregătit", e_status_pending: "În generare",

    // modal
    add_title: "Adaugă o nouă companie",
    add_sub: "Te conectăm la SPV-ul ANAF pentru firma ta. Durează 2 minute și poți revoca oricând.",
    add_label_cui: "CUI",
    add_label_name: "Denumire (opțional)",
    add_oauth_1: "Identificare prin SPV-ul ANAF",
    add_oauth_1_s: "Redirect securizat către anaf.ro · OAuth 2.0",
    add_oauth_2: "Verificare token și permisiuni",
    add_oauth_2_s: "Citim doar facturi e-Factura emise/primite",
    add_oauth_3: "Sincronizare istoric",
    add_oauth_3_s: "Aducem facturile din ultimele 30 zile, apoi zilnic",
    add_cta: "Continuă spre ANAF",
    add_cancel: "Anulează",
    toast_added: "Companie adăugată. Sincronizăm în fundal."
  },

  en: {
    nav_features: "Features", nav_insights: "Insights", nav_pricing: "Pricing", nav_faq: "FAQ",
    nav_signin: "Sign in", nav_demo: "Live demo",

    hero_eyebrow: "Tax compliance · ANAF e-Factura",
    hero_h1_a: "Your e-Invoice archive.",
    hero_h1_em: "On autopilot.",
    hero_h1_b: "For 6 years.",
    hero_lede: "Authorize once. ARHIVAR pulls daily from Romania's ANAF SPV, archives each invoice with a digital signature, and generates clean monthly stats. You only look when you want to.",
    hero_cta_primary: "Start free",
    hero_cta_secondary: "See the dashboard",
    hero_meta_1: "Compliant with OUG 120/2021",
    hero_meta_2: "Digitally signed archive",
    hero_meta_3: "Unlimited companies",

    how_eyebrow: "How it works",
    how_title: "Three steps. Then you stop thinking about it.",
    how_step1_t: "Authorize via SPV",
    how_step1_p: "Connect one or more companies through ANAF OAuth. Takes two minutes. You can revoke anytime.",
    how_step2_t: "ARHIVAR pulls everything",
    how_step2_p: "Daily sync from SPV — received and issued invoices, ANAF messages, XML and PDF attachments. Nothing is lost.",
    how_step3_t: "You get stats and archives",
    how_step3_p: "Each month: signed monthly archive, VAT report, top suppliers, threshold alerts. Everything stays available for 6 years.",

    features_eyebrow: "Features",
    features_title: "Built for accountants who don't want to call ANAF.",
    f1_t: "Multi-company",
    f1_p: "Instant company switcher. Granular role permissions. Designed for external accountants juggling dozens of clients.",
    f2_t: "6-year compliant archive",
    f2_p: "Every XML gets an RFC 3161 timestamp + signature. Verifiable with any eIDAS-compatible client.",
    f3_t: "Stats that matter",
    f3_p: "Cashflow, top suppliers, spend categories, automatic anomaly detection. Not just lists of PDFs.",
    f4_t: "Automatic monthly export",
    f4_p: "After the 5-day e-Factura grace window: previous month's package — signed ZIP, XML manifest, VAT report, drops straight into Saga / SmartBill.",
    f5_t: "Alerts and thresholds",
    f5_p: "Set thresholds per supplier or category. We notify you before you blow the monthly budget.",
    f6_t: "Native ANAF & SPV",
    f6_p: "We use the official APIs. No scraping, no magic. When SPV goes down, you see exactly what broke and why.",

    insights_eyebrow: "Insights that mean something",
    insights_title: "Your invoicing data, readable at a glance.",
    insights_p: "Your bank shows transactions. Your accountant shows declarations. ARHIVAR shows patterns — who you pay the most, what categories are growing, when you last crossed a threshold.",

    comp_title: "Compliance, not compromises.",
    comp_p: "Romanian law (OUG 120/2021 + Accounting Act) requires 6 years of e-Invoice retention. ARHIVAR does exactly that — with RFC 3161 timestamps, EU geographic redundancy, and ISO 27001 certification. If ANAF audits you, you just open a link.",
    comp_k1: "6 yrs", comp_l1: "Retention guaranteed by contract",
    comp_k2: "RFC 3161", comp_l2: "Trusted timestamp on every invoice",
    comp_k3: "ISO 27001", comp_l3: "Information-security certified",
    comp_k4: "EU", comp_l4: "All data stored within the EU",

    pricing_eyebrow: "Pricing",
    pricing_title: "Simple. Per company. No surprises.",
    p1_name: "Solo", p1_price: "0", p1_d: "RON / company / month", p1_sub: "For a single small company.",
    p2_name: "Professional", p2_price: "49", p2_d: "RON / company / month", p2_sub: "For active SRLs and accountants with 2–10 clients.",
    p3_name: "Accounting office", p3_price: "Contact", p3_d: "volume pricing", p3_sub: "For accountants with 10+ companies. Permissions, white-label, API.",
    p_cta_free: "Start free", p_cta_pro: "Start with Professional", p_cta_ent: "Contact us",
    p1_l1: "1 company · 200 invoices/month", p1_l2: "6-year signed archive", p1_l3: "Basic dashboard", p1_l4: "Manual monthly export",
    p2_l1: "10 companies · unlimited invoices*", p2_l2: "Everything in Solo, plus:", p2_l3: "Full stats · threshold alerts", p2_l4: "Automatic monthly export · API · SmartBill / Saga", p2_l5: "Priority email support",
    p3_l1: "Unlimited companies", p3_l2: "Granular role permissions", p3_l3: "Optional white-label", p3_l4: "99.9% SLA · Dedicated account manager",

    faq_eyebrow: "Frequently asked",
    faq_title: "Short answers.",
    faq_q1: "Do I need to change my accounting software?",
    faq_a1: "No. ARHIVAR sits on top of ANAF's SPV. Keep using Saga, SmartBill, Contabilo, NextUp — anything. You just get a clean archive on the side.",
    faq_q2: "What data do you collect?",
    faq_a2: "Only your e-Invoices sent and received through SPV, the related ANAF messages, and your company contact info. We don't access bank accounts, we don't read anything else.",
    faq_q3: "What happens if I close my account?",
    faq_a3: "You get a final ZIP with every signed invoice plus an XML manifest for independent verification. You have 90 days to download, after which we wipe it from our servers.",
    faq_q4: "Why 6 years and not 10?",
    faq_a4: "Because OUG 120/2021 art. 3 specifies 6 years for e-Invoice. If your business needs 10 (classic tax invoice retention), we'll hold them anyway — opt in via Settings.",
    faq_q5: "Can I authorize companies with and without an RO prefix?",
    faq_a5: "Yes, both. The system auto-detects VAT payers and separates thresholds accordingly.",
    faq_q6: "Is there an API?",
    faq_a6: "Yes, on Professional and Office plans. REST + webhooks to sync with your own systems.",

    foot_product: "Product", foot_company: "Company", foot_legal: "Legal",
    foot_features: "Features", foot_pricing: "Pricing", foot_changelog: "Changelog",
    foot_about: "About", foot_contact: "Contact", foot_blog: "Blog",
    foot_terms: "Terms", foot_privacy: "Privacy", foot_dpa: "Data processing",
    foot_copy: "© 2026 ARHIVAR",
    foot_lede: "Compliant archive for ANAF e-Factura. Made in Iași.",

    s_dash: "Dashboard", s_companies: "Companies", s_invoices: "Invoices",
    s_anaf: "ANAF messages", s_suppliers: "Suppliers", s_stats: "Statistics",
    s_exports: "Exports", s_notif: "Notifications", s_settings: "Settings", s_admin: "Admin",
    s_main: "Main", s_data: "Data", s_account: "Account",

    d_greeting: "Good morning,",
    d_subtitle: "Here's what happened in your archive over the last 30 days.",
    d_add_company: "Add company",
    d_export_month: "Export month",

    kpi_received: "Invoices received", kpi_issued: "Invoices issued", kpi_tva: "VAT payable", kpi_archive: "Archive",

    cashflow_t: "Monthly cashflow",
    cashflow_s: "In vs out, last 6 months · RON",
    cats_t: "Spend by category",
    cats_s: "May 2026",
    supp_t: "Top suppliers", supp_s: "Last 30 days",
    rec_t: "Recent invoices", rec_s: "Latest documents archived from SPV",
    rec_all: "View all",
    mon_t: "Monitoring",
    mon_companies: "Companies", mon_authorized: "Authorized", mon_thresholds: "Thresholds hit", mon_unread: "Unread alerts",
    usage_t: "Archive usage", usage_invoices_archived: "invoices archived",
    usage_limit: "Operational limit: 5 GB/year/company. Invoice count stays unlimited within reason.",
    usage_export_note: "Monthly export generates after the 5-day e-Factura grace window.",

    legend_in: "Inflow", legend_out: "Outflow",
    inv_status_received: "Received", inv_status_issued: "Issued", inv_status_paid: "Paid", inv_status_pending: "Pending",

    c_title: "Authorized companies",
    c_sub: "Companies ARHIVAR pulls and archives for automatically.",
    c_th_name: "Company", c_th_cui: "CUI", c_th_status: "Status", c_th_invoices: "Invoices", c_th_last: "Last sync", c_th_action: "",
    c_status_active: "Active", c_status_pending: "Authorizing", c_status_error: "Token error",

    i_title: "Invoices",
    i_sub: "All documents archived from SPV.",
    i_filter_all: "All", i_filter_in: "Received", i_filter_out: "Issued",
    i_th_partner: "Partner", i_th_no: "Number", i_th_date: "Date", i_th_amount: "Amount", i_th_tva: "VAT", i_th_status: "Status",

    st_title: "Statistics", st_sub: "Patterns in what flows in and out per company.",
    st_period: "Period",
    st_period_30: "30 days", st_period_90: "90 days", st_period_year: "This year",

    e_title: "Monthly exports", e_sub: "Digitally signed archives. Available for 6 years.",
    e_download: "Download", e_status_ready: "Ready", e_status_pending: "Generating",

    add_title: "Add a new company",
    add_sub: "We connect you to ANAF's SPV for your company. Takes 2 minutes and you can revoke anytime.",
    add_label_cui: "CUI",
    add_label_name: "Name (optional)",
    add_oauth_1: "Identify via ANAF SPV",
    add_oauth_1_s: "Secure redirect to anaf.ro · OAuth 2.0",
    add_oauth_2: "Verify token and scopes",
    add_oauth_2_s: "We read only e-Factura invoices issued/received",
    add_oauth_3: "Sync history",
    add_oauth_3_s: "Pull the last 30 days, then daily after",
    add_cta: "Continue to ANAF",
    add_cancel: "Cancel",
    toast_added: "Company added. Syncing in the background."
  }
};

const I18nContext = React.createContext({ t: (k) => k, lang: "ro", setLang: () => {} });

function I18nProvider({ children, initialLang }) {
  const [lang, setLang] = React.useState(initialLang || "ro");
  const t = React.useCallback((k) => (STRINGS[lang] && STRINGS[lang][k]) || k, [lang]);
  React.useEffect(() => {
    document.documentElement.lang = lang;
  }, [lang]);
  return (
    <I18nContext.Provider value={{ t, lang, setLang }}>
      {children}
    </I18nContext.Provider>
  );
}

const useI18n = () => React.useContext(I18nContext);

Object.assign(window, { I18nContext, I18nProvider, useI18n, STRINGS });
