/* global React */
// Yomee — Auth Shared
// Reusable header + buttons + legal disclaimer used by SignUp/SignIn.
const { useState: useStateAS } = React;
// Legacy local HelpTooltip — kept as a no-op shim so any straggler imports work.
function HelpTooltip() { return null; }
function AuthHeader({ onBack, screenKey, noHelp = false }) {
const onHelp = () => {
if (window.YomeeHelp && screenKey) window.YomeeHelp.toggle(screenKey);
};
return (

{!noHelp && (
)}
);
}
// SSO Button — charcoal pill, brand mark on left
function SsoButton({ provider, label, arrow = false, onClick }) {
const [hover, setHover] = useStateAS(false);
const [pressed, setPressed] = useStateAS(false);
const bg = pressed
? "var(--yo-forest-700)"
: hover
? "var(--yo-mint-700)"
: "var(--yo-ink)";
let icon;
if (provider === "google") {
icon = (
);
} else {
icon = (
);
}
return (
);
}
// Outlined ghost button
function GhostButton({ children, onClick }) {
const [hover, setHover] = useStateAS(false);
return (
);
}
// Legal disclaimer
function LegalDisclaimer({ onOpenTerms, onOpenPrivacy }) {
const linkBase = {
background: "transparent",
border: "none",
padding: 0,
margin: 0,
cursor: "pointer",
color: "var(--yo-ink)",
fontFamily: "inherit",
fontSize: "inherit",
lineHeight: "inherit",
fontWeight: 700,
textDecoration: "underline",
textDecorationThickness: 1.5,
textUnderlineOffset: 3,
letterSpacing: "0.01em",
display: "inline",
verticalAlign: "baseline",
};
return (
Al continuar, aceptas nuestros{" "}
y
);
}
window.AuthHeader = AuthHeader;
window.SsoButton = SsoButton;
window.GhostButton = GhostButton;
window.LegalDisclaimer = LegalDisclaimer;
window.HelpTooltip = HelpTooltip;