/* global React, ReactDOM, COPY, Icon, BrandMark, VerticalFit, FeatureTour, SetupSteps, Persona, InsightsTeaser, Pricing, FAQ, CTABanner, Footer, MockShift, useTweaks, TweaksPanel, TweakSection, TweakRadio, TweakColor, TweakToggle */ const { useState, useEffect } = React; const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{ "brand": "VetTime", "lang": "de", "accent": "#5B5BF5", "heroLayout": "split", "showInsights": true, "showPersonas": true }/*EDITMODE-END*/; function applyAccent(hex) { // Convert hex to HSL approximation by setting --primary // Easier: set CSS variable as raw color and override hsl() composition const root = document.documentElement; if (!hex) return; const r = parseInt(hex.slice(1,3),16)/255, g = parseInt(hex.slice(3,5),16)/255, b = parseInt(hex.slice(5,7),16)/255; const max = Math.max(r,g,b), min = Math.min(r,g,b); let h=0, s=0, l=(max+min)/2; if (max!==min){ const d = max-min; s = l>0.5 ? d/(2-max-min) : d/(max+min); switch(max){ case r: h=(g-b)/d + (g
{brand === "VetTime" ? : {brand}}
); } function Hero({ t, brand, layout }) { return (
{t.hero.eyebrow}

{t.hero.h1Pre} {t.hero.h1Hi}

{t.hero.sub}

{t.hero.meta.map((m,i)=>( {m} ))}
{layout === "split" ? (
VetTime
) : (
VetTime
)}
); } function Avatar({ variant }) { // Three illustrated portraits — soft, line-art style, no photos required. // variant: "bun" | "wavy" | "blonde" const skin = "#F4D6BD"; const skinShade = "#E5BFA0"; const lip = "#C97A6E"; const cheek = "#F0A89B"; const eye = "#2A1F1A"; if (variant === "bun") { return ( ); } if (variant === "wavy") { return ( ); } // blonde return ( ); } function TrustBar({ t }) { const variants = ["bun", "wavy", "blonde"]; return (
{t.trust.label}
{t.trust.items.map((it, i) => (
{it.quote}
{it.name} {it.role}
))}
); } function App() { const [t, setTweak] = useTweaks(TWEAK_DEFAULTS); const [lang, setLang] = useState(t.lang); useEffect(()=>{ applyAccent(t.accent); }, [t.accent]); useEffect(()=>{ setLang(t.lang); }, [t.lang]); const copy = COPY[lang] || COPY.de; const brand = t.brand; // Brand swap: replace VetTime with MedTime in copy strings (light swap) const swapBrand = (str) => brand === "MedTime" ? str.replaceAll("VetTime","MedTime").replaceAll("Tierarztpraxen","Arztpraxen").replaceAll("Tierarztpraxis","Arztpraxis").replaceAll("Tierärzt:innen","Ärzt:innen").replaceAll("Tierärztin","Ärztin").replaceAll("Tierarzt","Arzt").replaceAll("TFA","MFA").replaceAll("vet-tech","MFA").replaceAll("veterinary","medical").replaceAll("clinic","practice") : str; // Apply swap to copy recursively (cheap deep map) const transform = (v) => { if (typeof v === "string") return swapBrand(v); if (Array.isArray(v)) return v.map(transform); if (v && typeof v === "object") { const out = {}; for (const k in v) out[k] = transform(v[k]); return out; } return v; }; const c = brand === "MedTime" ? transform(copy) : copy; return ( <>