/* FEDUCCE Catálogo — UI compartida: slots de foto, WhatsApp, header, footer. → window.FEDCAT_UI */
const KDS = window.FEDUCCEDesignSystem_349cd6;
const { Icon: KIcon } = KDS;
/* ------------------------------------------------------------- WhatsApp -- */
function WAGlyph({ size = 16, color = "currentColor" }) {
return (
);
}
/* Botón de WhatsApp — variantes: primary (bloque tinta), emerald, ghost, onDark */
function WAButton({ children, message, product, variant = "primary", style }) {
const [hover, setHover] = React.useState(false);
const url = product ? window.CAT_waProduct(product) : window.CAT_wa(message);
const V = {
primary: { background: hover ? "var(--ink-800)" : "var(--ink-900)", color: "var(--bone-50)", border: "1px solid var(--ink-900)" },
emerald: { background: hover ? "var(--emerald-700)" : "var(--emerald-600)", color: "var(--bone-50)", border: "1px solid transparent" },
ghost: { background: hover ? "var(--ink-900)" : "transparent", color: hover ? "var(--bone-50)" : "var(--ink-900)", border: "1px solid var(--ink-900)" },
onDark: { background: hover ? "var(--bone-50)" : "transparent", color: hover ? "var(--ink-900)" : "var(--bone-50)", border: "1px solid var(--border-on-dark)" },
}[variant];
return (
setHover(true)} onMouseLeave={() => setHover(false)}
style={{
display: "inline-flex", alignItems: "center", gap: "10px", padding: "14px 22px",
fontFamily: "var(--font-sans)", fontSize: "11px", fontWeight: 500, letterSpacing: "0.18em",
textTransform: "uppercase", textDecoration: "none", cursor: "pointer",
transition: "background var(--dur-base) var(--ease-standard), color var(--dur-base) var(--ease-standard)",
...V, ...style,
}}>
{children}
);
}
/* Burbuja fija, esquina inferior derecha */
function WAFloat() {
const [hover, setHover] = React.useState(false);
return (
setHover(true)} onMouseLeave={() => setHover(false)}
style={{
position: "fixed", right: "26px", bottom: "26px", zIndex: 120,
display: "flex", alignItems: "center", gap: "10px",
background: hover ? "var(--emerald-700)" : "var(--emerald-600)", color: "var(--bone-50)",
padding: "14px 16px", textDecoration: "none", boxShadow: "var(--shadow-md)",
transition: "background var(--dur-base) var(--ease-standard)",
}}>
Escríbenos
);
}
/* ------------------------------------------------------------- ImageSlot -- */
function CImageSlot({ label = "Fotografía de producto", index, ratio = "3 / 4", tone = "bone", style }) {
const dark = tone === "dark";
return (
{index && (
{index}
)}
[ {label} ]
);
}
function CFrame({ src, alt, index, label, ratio = "3 / 4", tone = "bone", hoverZoom = true, style }) {
const [hover, setHover] = React.useState(false);
if (!src) return ;
return (
setHover(true)} onMouseLeave={() => setHover(false)}
style={{ position: "relative", aspectRatio: ratio, overflow: "hidden", background: "var(--ink-900)", ...style }}>

{index && (
{index}
)}
);
}
/* ---------------------------------------------------------------- Header -- */
function CHeader({ route, go }) {
const links = [["Catálogo", "catalogo"], ["La Casa", "about"], ["Contacto", "contacto"]];
const navItem = ([label, to]) => {
const active = route === to;
return (
);
};
return (
WhatsApp
);
}
/* ---------------------------------------------------------------- Footer -- */
function CFooter({ go }) {
const col = (title, items) => (
{title}
{items.map(([label, fn]) => (
))}
);
return (
);
}
Object.assign(window, { WAGlyph, WAButton, WAFloat, CImageSlot, CFrame });
window.FEDCAT_UI = { WAGlyph, WAButton, WAFloat, CImageSlot, CFrame, CHeader, CFooter };