// ============================================================ // Foro Valor Emprendedor ? Components // ============================================================ const { useState, useEffect, useRef, useMemo } = React; const CONTACT_EMAIL = "evento@fundacionvaloremprendedor.com"; const CONTACT_PHONE_DISPLAY = "+34 611 94 13 68"; const CONTACT_PHONE_RAW = "34611941368"; const CONTACT_WHATSAPP_URL = `https://wa.me/${CONTACT_PHONE_RAW}`; const FLOAT_WHATSAPP_RAW = CONTACT_PHONE_RAW; const FLOAT_WHATSAPP_URL = `https://wa.me/${FLOAT_WHATSAPP_RAW}`; const CONTACT_MAILTO_URL = `mailto:${CONTACT_EMAIL}`; const CONTACT_TEL_URL = `tel:+${CONTACT_PHONE_RAW}`; const SOCIAL_X_URL = "https://x.com/ForoValor"; const SOCIAL_INSTAGRAM_URL = "https://www.instagram.com/forovaloremprendedor/"; const SOCIAL_LINKEDIN_URL = "https://www.linkedin.com/company/foro-valor-emprendedor/?viewAsMember=true"; async function submitInboxForm(payload) { const response = await fetch("/api/contact.php", { method: "POST", headers: { "Content-Type": "application/json", "Accept": "application/json", }, body: JSON.stringify({ formType: payload.formType || "Solicitud web", audience: payload.audience || "", nombre: payload.nombre || "", medio: payload.medio || "", email: payload.email || "", telefono: payload.telefono || "", empresa: payload.empresa || "", acreditaciones: payload.acreditaciones || "", mensaje: payload.mensaje || "", motivacion: payload.motivacion || "", origen: payload.origen || window.location.href, }), }); let data = {}; try { data = await response.json(); } catch (error) { data = {}; } if (!response.ok || !data.ok) { throw new Error(data.error || "No se pudo enviar el formulario."); } return data; } // ---------- Custom Cursor ---------- function CustomCursor() { const dotRef = useRef(null); const ringRef = useRef(null); const [label, setLabel] = useState(""); const [hovering, setHovering] = useState(false); const hoverStateRef = useRef({ hovering: false, label: "" }); useEffect(() => { if (window.matchMedia("(pointer: coarse)").matches) return undefined; let mx = window.innerWidth / 2, my = window.innerHeight / 2; let rx = mx, ry = my; let dx = mx, dy = my; let raf; const onMove = (e) => { mx = e.clientX; my = e.clientY; }; const onOver = (e) => { const t = e.target.closest("[data-cursor]"); const nextHovering = !!t; const nextLabel = t ? (t.getAttribute("data-cursor") || "") : ""; const { hovering: prevHovering, label: prevLabel } = hoverStateRef.current; if (nextHovering !== prevHovering) { hoverStateRef.current.hovering = nextHovering; setHovering(nextHovering); } if (nextLabel !== prevLabel) { hoverStateRef.current.label = nextLabel; setLabel(nextLabel); } }; const tick = () => { rx += (mx - rx) * 0.76; ry += (my - ry) * 0.76; dx += (mx - dx) * 0.92; dy += (my - dy) * 0.92; if (dotRef.current) dotRef.current.style.transform = `translate3d(${dx}px, ${dy}px, 0) translate(-50%, -50%)`; if (ringRef.current) { const scale = hoverStateRef.current.hovering ? 2.35 : 1; ringRef.current.style.transform = `translate3d(${rx}px, ${ry}px, 0) translate(-50%, -50%) scale(${scale})`; } raf = requestAnimationFrame(tick); }; raf = requestAnimationFrame(tick); window.addEventListener("pointermove", onMove, { passive: true }); window.addEventListener("mouseover", onOver); return () => { cancelAnimationFrame(raf); window.removeEventListener("pointermove", onMove); window.removeEventListener("mouseover", onOver); }; }, []); return ( <>
{label && {label}}
); } Object.assign(window, { CONTACT_EMAIL, CONTACT_PHONE_DISPLAY, CONTACT_PHONE_RAW, CONTACT_WHATSAPP_URL, FLOAT_WHATSAPP_RAW, FLOAT_WHATSAPP_URL, CONTACT_MAILTO_URL, CONTACT_TEL_URL, SOCIAL_X_URL, SOCIAL_INSTAGRAM_URL, SOCIAL_LINKEDIN_URL, submitInboxForm, }); // ---------- Floating WhatsApp ---------- function FloatingWhatsApp() { return ( Necesitas ayuda con algo? ); } // ---------- Nav ---------- function Nav({ dark, current = "home" }) { const [scrolled, setScrolled] = useState(false); const [open, setOpen] = useState(false); useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 40); window.addEventListener("scroll", onScroll); return () => window.removeEventListener("scroll", onScroll); }, []); const logo = dark ? "assets/logo-blanco.png" : "assets/logo-color.png"; const homeSection = (anchor) => current === "home" ? anchor : `/${anchor}`; const links = [ { href: "/", label: "Inicio", key: "home" }, { href: homeSection("#ponentes-invitados"), label: "Ponentes", key: "ponentes" }, { href: "/agenda/", label: "Agenda", key: "agenda" }, { href: homeSection("#entradas-foro"), label: "Entradas", key: "entradas" }, { href: "/patrocinadores/", label: "Patrocinadores", key: "patrocinadores" }, { href: "/prensa/", label: "Prensa", key: "prensa" }, ]; const reservaHref = current === "home" ? "#contacto-reservas" : "/#contacto-reservas"; const IconTW = () => ( ); const IconIG = () => ( ); const IconLI = () => ( ); return (
Foro Valor Emprendedor
Reservar plaza
{open && (
{links.map((l) => ( setOpen(false)}>{l.label} ))} setOpen(false)}> Reservar plaza
)}
); } // ---------- Hero ---------- function HeroOrbs() { const o1 = useRef(null); const o2 = useRef(null); useEffect(() => { let raf; const start = performance.now(); const loop = (now) => { const t = (now - start) / 1000; if (o1.current) o1.current.style.transform = `translate(${Math.sin(t * 0.3) * 30}px, ${Math.cos(t * 0.2) * 20}px)`; if (o2.current) o2.current.style.transform = `translate(${Math.cos(t * 0.25) * 40}px, ${Math.sin(t * 0.35) * 30}px)`; raf = requestAnimationFrame(loop); }; raf = requestAnimationFrame(loop); return () => cancelAnimationFrame(raf); }, []); return (
); } function HeroCountdown() { const [cd, setCd] = useState(() => { const target = new Date("2026-09-26T09:00:00+02:00").getTime(); const diff = Math.max(0, target - Date.now()); return { d: Math.floor(diff / 86400000), h: Math.floor((diff % 86400000) / 3600000), m: Math.floor((diff % 3600000) / 60000), }; }); useEffect(() => { const id = setInterval(() => { const target = new Date("2026-09-26T09:00:00+02:00").getTime(); const diff = Math.max(0, target - Date.now()); setCd({ d: Math.floor(diff / 86400000), h: Math.floor((diff % 86400000) / 3600000), m: Math.floor((diff % 3600000) / 60000), }); }, 30000); return () => clearInterval(id); }, []); return (
Empieza en
{cd.d}días
{String(cd.h).padStart(2, "0")}horas
{String(cd.m).padStart(2, "0")}min
); } function Hero() { return (
Edición 2026 · Plazas abiertas
Auditorio Mar de Vigo · Galicia

El foro donde Galicia emprende & crece.

Un día. Dieciocho ponentes del habla hispana. Cientos de emprendedores compartiendo clientes, aprendizajes y oportunidades reales.

Organizadores
Asesoría Emprendedor
); } Object.assign(window, { CustomCursor, FloatingWhatsApp, Nav, Hero });