// Line icons, hand-drawn to match the thin Cinzel-era linework.

const Icon = ({ name, size = 20, strokeWidth = 1.4 }) => {
  const s = { width: size, height: size, strokeWidth, fill: 'none', stroke: 'currentColor', strokeLinecap: 'round', strokeLinejoin: 'round' };
  switch (name) {
    case 'home':
      return <svg viewBox="0 0 24 24" {...s}><path d="M3 11l9-8 9 8v10a1 1 0 0 1-1 1h-5v-7h-6v7H4a1 1 0 0 1-1-1V11z" /></svg>;
    case 'news':
      return <svg viewBox="0 0 24 24" {...s}><rect x="3" y="4" width="18" height="16" rx="1.5"/><path d="M7 8h7M7 12h10M7 16h6"/></svg>;
    case 'trips':
      return <svg viewBox="0 0 24 24" {...s}><path d="M12 2l3 7h7l-5.5 4.5 2 7.5L12 17l-6.5 4 2-7.5L2 9h7l3-7z"/></svg>;
    case 'gallery':
      return <svg viewBox="0 0 24 24" {...s}><rect x="3" y="4" width="18" height="16" rx="1.5"/><circle cx="9" cy="10" r="1.5"/><path d="M3 17l5-5 4 4 3-3 6 6"/></svg>;
    case 'guides':
      return <svg viewBox="0 0 24 24" {...s}><path d="M4 5v15l5-3 6 3 5-3V2l-5 3-6-3-5 3z"/><path d="M9 5v12M15 5v12"/></svg>;
    case 'arrow-right':
      return <svg viewBox="0 0 24 24" {...s}><path d="M5 12h14M13 6l6 6-6 6"/></svg>;
    case 'arrow-left':
      return <svg viewBox="0 0 24 24" {...s}><path d="M19 12H5M11 6l-6 6 6 6"/></svg>;
    case 'arrow-up-right':
      return <svg viewBox="0 0 24 24" {...s}><path d="M7 17L17 7M9 7h8v8"/></svg>;
    case 'close':
      return <svg viewBox="0 0 24 24" {...s}><path d="M6 6l12 12M18 6L6 18"/></svg>;
    case 'settings':
      return <svg viewBox="0 0 24 24" {...s}><circle cx="12" cy="12" r="3"/><path d="M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83"/></svg>;
    case 'search':
      return <svg viewBox="0 0 24 24" {...s}><circle cx="11" cy="11" r="7"/><path d="M20 20l-4-4"/></svg>;
    case 'play':
      return <svg viewBox="0 0 24 24" {...s}><path d="M7 4l13 8-13 8V4z"/></svg>;
    case 'zoom':
      return <svg viewBox="0 0 24 24" {...s}><path d="M3 9V3h6M21 9V3h-6M3 15v6h6M21 15v6h-6"/></svg>;
    case 'info':
      return <svg viewBox="0 0 24 24" {...s}><circle cx="12" cy="12" r="9"/><path d="M12 8v.01M11 12h1v5h1"/></svg>;
    case 'camera':
      return <svg viewBox="0 0 24 24" {...s}><path d="M3 7h3l2-3h8l2 3h3v13H3V7z"/><circle cx="12" cy="13" r="4"/></svg>;
    case 'location':
      return <svg viewBox="0 0 24 24" {...s}><path d="M12 22s8-7 8-13a8 8 0 0 0-16 0c0 6 8 13 8 13z"/><circle cx="12" cy="9" r="2.5"/></svg>;
    case 'calendar':
      return <svg viewBox="0 0 24 24" {...s}><rect x="3" y="5" width="18" height="16" rx="1.5"/><path d="M3 10h18M8 3v4M16 3v4"/></svg>;
    case 'menu':
      return <svg viewBox="0 0 24 24" {...s}><path d="M4 7h16M4 12h16M4 17h16"/></svg>;
    default: return null;
  }
};

Object.assign(window, { Icon });
