/* Shared React components for LK Mejia website */ const WA_NUMBER = "573195640848"; const WA_BASE = "https://wa.me/" + WA_NUMBER; function waLink(productName) { const msg = encodeURIComponent("Hola! Me interesa " + (productName ? "el " + productName : "sus productos") + ". ¿Me podrías dar más información?"); return WA_BASE + "?text=" + msg; } /* ── ICONS (Lucide-style) ── */ const Icon = ({ name, size = 20, color = "currentColor", sw = 2 }) => { const icons = { search: <>, book: <>, store: <>, cart: <>, users: <>, star: <>, map: <>, clock: <>, check: <>, calendar: <>, mail: <>, phone: <>, send: <>, chevRight: <>, chevLeft: <>, arrowRight: <>, x: <>, truck: <>, heart: <>, globe: <>, award: <>, shield: <>, handshake: <>, lightbulb: <>, coffee: <>, wheat: <>, palette: <>, wrench: <>, box: <> }; return ( {icons[name] || null} ); }; /* ── WHATSAPP ICON ── */ const WhatsAppIcon = ({ size = 26 }) => ; /* ── NAV BAR ── */ const NavBar = ({ currentPage, setPage, onSearch }) => { const [menuOpen, setMenuOpen] = React.useState(false); const links = [ { id: 'home', label: 'Inicio' }, { id: 'academia', label: 'Academia' }, { id: 'tienda', label: 'Tienda' }, { id: 'recetario', label: 'Recetas y Blog' }, { id: 'contacto', label: 'Contacto' }]; const navigate = (id) => {setPage(id);setMenuOpen(false);}; return ( ); }; /* ── SEARCH OVERLAY ── */ const SearchOverlay = ({ onClose, setPage }) => { const [query, setQuery] = React.useState(''); const allItems = React.useMemo(() => { const items = []; (window.TALLERES_DATA || []).forEach((t) => items.push({ type: 'taller', name: t.nombre, cat: t.categoria, page: 'academia' })); (window.INSUMOS_DATA || []).forEach((i) => items.push({ type: 'insumo', name: i.nombre, cat: i.categoria, page: 'tienda' })); return items; }, []); const results = query.length > 1 ? allItems.filter((i) => i.name.toLowerCase().includes(query.toLowerCase()) || i.cat.toLowerCase().includes(query.toLowerCase())).slice(0, 10) : []; return (
e.stopPropagation()}>
setQuery(e.target.value)} autoFocus />
{results.map((r, i) =>
{setPage(r.page);onClose();}}> {r.type === 'taller' ? '📚 Taller' : '🧁 Insumo'}
{r.name}
{r.cat}
)} {query.length > 1 && results.length === 0 &&

No se encontraron resultados para "{query}"

} {query.length <= 1 &&

Escribe para buscar talleres o insumos

}
); }; /* ── TOP BAR ── */ const TopBar = ({ setPage }) =>
🎓 ¡Nuevos talleres disponibles! Últimos cupos para 2026 — setPage('academia')}>Ver talleres →
; /* ── FOOTER ── */ const Footer = ({ setPage }) => ; /* ── WHATSAPP FAB ── */ const WhatsAppFab = ({ productName }) => ; /* ── MARCAS LOGOS ── */ const MarcasLogos = () => { const logos = window.MARCAS_LOGOS || []; return (

Marcas que comercializamos

{logos.map((m, i) =>
{m.nombre}
)}
); }; /* ── IMAGE WITH PLACEHOLDER FALLBACK ── */ const Img = ({ src, alt, style, className }) => { const [err, setErr] = React.useState(false); if (!src || err) { return (
{alt || "Imagen"}
); } return {alt} setErr(true)} />; }; /* ── FORMAT PRICE ── */ function formatPrice(n) { return "$" + n.toLocaleString('es-CO'); } /* ── STATS BAR ── */ const StatsBar = () =>
+4.000
Estudiantes formados
4.6★
Calificación promedio
+500
Talleres realizados
Máx. 6
Personas por taller
; Object.assign(window, { Icon, WhatsAppIcon, NavBar, SearchOverlay, TopBar, Footer, WhatsAppFab, Img, formatPrice, StatsBar, MarcasLogos, waLink, WA_NUMBER, WA_BASE });