// logo.jsx — uses the real Imperatriz SVG files (with theme variants)

const IMP_GOLD = '#F5C518';
const IMP_DARK = '#2A2A2D';

// Logo variants by theme
const LOGO_SRC = {
  // dark text — for light backgrounds
  dark: 'assets/logos/imperatriz-horizontal.svg',
  // white text — for dark backgrounds and yellow surfaces
  light: 'assets/logos/imperatriz-horizontal-branca.svg',
};

function ImperatrizLogo({ height = 44, theme = 'dark', showAnniversary = true /* kept for API compat */ }) {
  // The SVG has aspect 960:200 = 4.8:1. Height drives the size.
  const src = theme === 'light' || theme === 'onYellow' ? LOGO_SRC.light : LOGO_SRC.dark;
  return (
    <img
      src={src}
      alt="Imperatriz Seguros — 35 anos"
      style={{ height, width: 'auto', display: 'block', userSelect: 'none' }}
      draggable="false"
    />
  );
}

// Mark-only — uses the vertical "concha branca" file, cropped via the concha-only variant
function ImperatrizMark({ size = 32, theme = 'dark' }) {
  const src = theme === 'light' ? 'assets/logos/imperatriz-concha-branca.svg' : 'assets/logos/imperatriz-vertical.svg';
  return (
    <img
      src={src}
      alt="Imperatriz Seguros"
      style={{ height: size, width: 'auto', display: 'block', userSelect: 'none' }}
      draggable="false"
    />
  );
}

Object.assign(window, { ImperatrizLogo, ImperatrizMark, IMP_GOLD, IMP_DARK });
