/* WP Site Beam — Icon set (simple monoline SVGs, stroke=currentColor) */
const Icon = ({ name, size = 16, style, className }) => {
  const p = { width: size, height: size, viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: 1.75, strokeLinecap: 'round', strokeLinejoin: 'round', style, className };
  const paths = {
    dashboard: <><rect x="3" y="3" width="7" height="9" rx="1.5"/><rect x="14" y="3" width="7" height="5" rx="1.5"/><rect x="14" y="12" width="7" height="9" rx="1.5"/><rect x="3" y="16" width="7" height="5" rx="1.5"/></>,
    sites:     <><circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3c3 3.5 3 14 0 18M12 3c-3 3.5-3 14 0 18"/></>,
    account:   <><circle cx="12" cy="8" r="4"/><path d="M4 21c0-4 4-6 8-6s8 2 8 6"/></>,
    billing:   <><rect x="3" y="6" width="18" height="13" rx="2"/><path d="M3 10h18M7 15h3"/></>,
    requests:  <><path d="M12 3v2M5.2 5.2l1.4 1.4M3 12h2M18.8 5.2l-1.4 1.4M21 12h-2"/><path d="M9 19h6M10 22h4M12 8a4 4 0 00-3 6.5c.6.7 1 1.2 1 2.5h4c0-1.3.4-1.8 1-2.5A4 4 0 0012 8z"/></>,
    support:   <><path d="M21 12a9 9 0 10-3.1 6.8M21 12v5a2 2 0 01-2 2h-3"/><path d="M8 10h8M8 14h5"/></>,
    scanner:   <><circle cx="11" cy="11" r="7"/><path d="M16 16l5 5"/></>,
    workspace: <><path d="M21 15a4 4 0 01-4 4H8l-5 3V6a4 4 0 014-4h10a4 4 0 014 4z"/></>,
    bell:      <><path d="M6 8a6 6 0 1112 0c0 7 3 7 3 9H3c0-2 3-2 3-9z"/><path d="M10 21a2 2 0 004 0"/></>,
    brain:     <><path d="M9 4a3 3 0 013 3v10a3 3 0 11-6 0 3 3 0 01-3-3V9a3 3 0 013-3 3 3 0 013-2z"/><path d="M15 4a3 3 0 00-3 3v10a3 3 0 106 0 3 3 0 003-3V9a3 3 0 00-3-3 3 3 0 00-3-2z"/></>,
    lock:      <><rect x="4" y="11" width="16" height="9" rx="2"/><path d="M8 11V8a4 4 0 118 0v3"/></>,
    crown:     <><path d="M3 7l4 4 5-6 5 6 4-4v10H3z"/></>,
    team:      <><circle cx="9" cy="8" r="3"/><circle cx="17" cy="10" r="2.5"/><path d="M3 20c0-3 3-5 6-5s6 2 6 5M15 20c0-2 2-4 5-4"/></>,
    modules:   <><rect x="3" y="3" width="8" height="8" rx="1.5"/><rect x="13" y="3" width="8" height="8" rx="1.5"/><rect x="3" y="13" width="8" height="8" rx="1.5"/><rect x="13" y="13" width="8" height="8" rx="1.5"/></>,
    brand:     <><circle cx="12" cy="12" r="9"/><circle cx="8.5" cy="9.5" r="1.3"/><circle cx="15.5" cy="9.5" r="1.3"/><circle cx="16.5" cy="14.5" r="1.3"/><path d="M12 21a3 3 0 003-3 3 3 0 00-3-3"/></>,
    building:  <><rect x="4" y="3" width="16" height="18" rx="1"/><path d="M8 7h2M14 7h2M8 11h2M14 11h2M8 15h2M14 15h2M10 21v-4h4v4"/></>,
    signout:   <><path d="M15 3h4a2 2 0 012 2v14a2 2 0 01-2 2h-4M10 17l-5-5 5-5M5 12h11"/></>,
    sun:       <><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M2 12h2M20 12h2M4.2 4.2l1.4 1.4M18.4 18.4l1.4 1.4M4.2 19.8l1.4-1.4M18.4 5.6l1.4-1.4"/></>,
    moon:      <><path d="M21 13a9 9 0 11-10-10 7 7 0 0010 10z"/></>,
    sliders:   <><path d="M4 6h10M18 6h2M4 12h4M12 12h8M4 18h12M20 18h0"/><circle cx="16" cy="6" r="2"/><circle cx="10" cy="12" r="2"/><circle cx="18" cy="18" r="2"/></>,
    plus:      <><path d="M12 5v14M5 12h14"/></>,
    upload:    <><path d="M12 3v12M7 8l5-5 5 5M5 21h14"/></>,
    sparkles:  <><path d="M12 3l2 5 5 2-5 2-2 5-2-5-5-2 5-2z"/><path d="M18 14l1 2 2 1-2 1-1 2-1-2-2-1 2-1z"/></>,
    check:     <><path d="M5 13l4 4L20 6"/></>,
    x:         <><path d="M6 6l12 12M6 18L18 6"/></>,
    chevron:   <><path d="M9 6l6 6-6 6"/></>,
    'chevron-down': <><path d="M6 9l6 6 6-6"/></>,
    'chevron-right': <><path d="M9 6l6 6-6 6"/></>,
    'chevron-left': <><path d="M15 6l-6 6 6 6"/></>,
    external:  <><path d="M14 4h6v6"/><path d="M20 4L10 14"/><path d="M19 14v5a1 1 0 01-1 1H5a1 1 0 01-1-1V6a1 1 0 011-1h5"/></>,
    menu:      <><path d="M4 6h16M4 12h16M4 18h16"/></>,
    search:    <><circle cx="11" cy="11" r="7"/><path d="M16 16l5 5"/></>,
    info:      <><circle cx="12" cy="12" r="9"/><path d="M12 11v5M12 8v.5"/></>,
    warn:      <><path d="M12 3l10 17H2z"/><path d="M12 10v5M12 17v.5"/></>,
    spark:     <><path d="M12 3l2.5 6 6.5 1-5 4 1.5 7L12 17l-5.5 4L8 14 3 10l6.5-1z"/></>,
    globe:     <><circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3a15 15 0 010 18M12 3a15 15 0 000 18"/></>,
    activity:  <><path d="M3 12h4l3-8 4 16 3-8h4"/></>,
    docs:      <><path d="M14 3H6a2 2 0 00-2 2v14a2 2 0 002 2h12a2 2 0 002-2V9l-6-6z"/><path d="M14 3v6h6M8 13h8M8 17h6"/></>,
    shield:    <><path d="M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6z"/><path d="M9 12l2 2 4-4"/></>,
    flag:      <><path d="M5 21V4M5 4h11l-2 4 2 4H5"/></>,
    clock:     <><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></>,
    ai:        <><rect x="4" y="4" width="16" height="16" rx="3"/><path d="M9 15V9l3 4 3-4v6"/></>,
    download:  <><path d="M12 3v12M7 10l5 5 5-5M5 21h14"/></>,
    tasks:     <><rect x="3" y="4" width="6" height="16" rx="1.5"/><rect x="11" y="4" width="6" height="10" rx="1.5"/><rect x="19" y="4" width="2" height="6" rx="1"/></>,
    content:   <><path d="M4 4h12l4 4v12a0 0 0 010 0H4z"/><path d="M16 4v4h4M7 12h10M7 16h7M7 8h5"/></>,
    marketing: <><path d="M3 11l16-7v16l-16-7z"/><path d="M9 13v5a2 2 0 01-4 0v-3"/></>,
    partners:  <><circle cx="8" cy="9" r="3"/><circle cx="16" cy="9" r="3"/><path d="M2 20c0-3 2.5-5 6-5s6 2 6 5M14 15c3.5 0 6 2 6 5"/></>,
    wiki:      <><path d="M5 4h11a3 3 0 013 3v13H7a2 2 0 01-2-2z"/><path d="M5 18a2 2 0 012-2h12M9 8h6M9 12h6"/></>,
    notes:     <><path d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2"/><rect x="9" y="3" width="6" height="4" rx="1"/><path d="M9 12h6M9 16h4"/></>,
    mail:      <><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3 7l9 6 9-6"/></>,
    users:     <><circle cx="8" cy="8" r="3"/><circle cx="16" cy="8" r="3"/><path d="M2 20c0-3 2.5-5 6-5s6 2 6 5M14 17c1-1.5 2.5-2 4-2s3 .5 4 2"/></>,
    acquisition: <><path d="M3 17l6-6 4 4 8-10"/><path d="M14 5h7v7"/><circle cx="3" cy="17" r="1.5"/></>,
    edit:      <><path d="M4 20h4L20 8l-4-4L4 16v4z"/><path d="M14 6l4 4"/></>,
    archive:   <><rect x="3" y="4" width="18" height="4" rx="1"/><path d="M5 8v11a1 1 0 001 1h12a1 1 0 001-1V8M10 12h4"/></>,
    trash:     <><path d="M4 7h16M10 11v6M14 11v6M6 7l1 13a2 2 0 002 2h6a2 2 0 002-2l1-13M9 7V4a1 1 0 011-1h4a1 1 0 011 1v3"/></>,
    refresh:   <><path d="M21 12a9 9 0 11-3-6.7M21 4v5h-5"/></>,
    loader:    <><path d="M12 3v4M12 17v4M3 12h4M17 12h4M5.6 5.6l2.8 2.8M15.6 15.6l2.8 2.8M5.6 18.4l2.8-2.8M15.6 8.4l2.8-2.8"/></>,
    trend:     <><path d="M3 17l6-6 4 4 8-10"/><path d="M14 5h7v7"/></>,
    chart:     <><path d="M3 3v18h18"/><path d="M7 15l3-4 3 2 5-7"/></>,
    calendar:  <><rect x="3" y="5" width="18" height="16" rx="2"/><path d="M3 9h18M8 3v4M16 3v4"/></>,
    filter:    <><path d="M3 5h18l-7 9v5l-4 2v-7z"/></>,
    image:     <><rect x="3" y="4" width="18" height="16" rx="2"/><circle cx="9" cy="10" r="2"/><path d="M3 17l5-5 4 4 3-3 6 6"/></>,
    redirect:  <><path d="M3 9h12a4 4 0 014 4v0a4 4 0 01-4 4H9"/><path d="M6 14l-3 3 3 3"/><path d="M15 5l3 4-3 4"/></>,
    sitebuilder: <><rect x="3" y="3" width="18" height="14" rx="2"/><path d="M3 8h18M7 12h6"/><circle cx="17" cy="19" r="3"/><path d="M17 17.5v3M15.5 19h3"/></>,
    list:      <><path d="M8 6h13M8 12h13M8 18h13"/><circle cx="4" cy="6" r="1"/><circle cx="4" cy="12" r="1"/><circle cx="4" cy="18" r="1"/></>,
    code:      <><path d="M8 7l-5 5 5 5M16 7l5 5-5 5M14 4l-4 16"/></>,
    file:      <><path d="M14 3H6a2 2 0 00-2 2v14a2 2 0 002 2h12a2 2 0 002-2V9l-6-6z"/><path d="M14 3v6h6"/></>,
    minus:     <><path d="M5 12h14"/></>,
    sitemap:   <><rect x="9" y="3" width="6" height="4" rx="1"/><rect x="3" y="17" width="6" height="4" rx="1"/><rect x="15" y="17" width="6" height="4" rx="1"/><path d="M12 7v5M6 17v-5h12v5"/></>,
    plugin:    <><path d="M9 3v4M15 3v4M6 7h12v4a4 4 0 01-4 4h-4a4 4 0 01-4-4zM12 15v6"/></>,
    alert:     <><path d="M12 3l10 17H2z"/><path d="M12 10v5M12 17v.5"/></>,
    copy:      <><rect x="8" y="8" width="12" height="12" rx="2"/><path d="M4 16V5a1 1 0 011-1h11"/></>,
    user:      <><circle cx="12" cy="8" r="4"/><path d="M4 21c0-4 4-6 8-6s8 2 8 6"/></>,
    link:      <><path d="M10 14a4 4 0 005.66 0l3-3a4 4 0 00-5.66-5.66l-1 1"/><path d="M14 10a4 4 0 00-5.66 0l-3 3a4 4 0 005.66 5.66l1-1"/></>,
    type:      <><path d="M5 7V5h14v2M12 5v14M9 19h6"/></>,
    stack:     <><path d="M12 3l9 5-9 5-9-5z"/><path d="M3 13l9 5 9-5M3 17l9 5 9-5"/></>,
    radio:     <><circle cx="12" cy="12" r="2"/><path d="M8 8a5.66 5.66 0 000 8M16 8a5.66 5.66 0 010 8M5 5a10 10 0 000 14M19 5a10 10 0 010 14"/></>,
    share:     <><circle cx="6" cy="12" r="2.5"/><circle cx="18" cy="6" r="2.5"/><circle cx="18" cy="18" r="2.5"/><path d="M8.5 11l7-4M8.5 13l7 4"/></>,
    settings:  <><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.7 1.7 0 00.3 1.8l.1.1a2 2 0 11-2.8 2.8l-.1-.1a1.7 1.7 0 00-1.8-.3 1.7 1.7 0 00-1 1.5V21a2 2 0 01-4 0v-.1a1.7 1.7 0 00-1.1-1.5 1.7 1.7 0 00-1.8.3l-.1.1a2 2 0 11-2.8-2.8l.1-.1a1.7 1.7 0 00.3-1.8 1.7 1.7 0 00-1.5-1H3a2 2 0 010-4h.1a1.7 1.7 0 001.5-1.1 1.7 1.7 0 00-.3-1.8l-.1-.1a2 2 0 112.8-2.8l.1.1a1.7 1.7 0 001.8.3H9a1.7 1.7 0 001-1.5V3a2 2 0 014 0v.1a1.7 1.7 0 001 1.5 1.7 1.7 0 001.8-.3l.1-.1a2 2 0 112.8 2.8l-.1.1a1.7 1.7 0 00-.3 1.8V9a1.7 1.7 0 001.5 1H21a2 2 0 010 4h-.1a1.7 1.7 0 00-1.5 1z"/></>,
    calc:      <><rect x="4" y="3" width="16" height="18" rx="2"/><path d="M8 7h8M8 12h2M12 12h2M16 12h0M8 16h2M12 16h2M16 16h0M8 20h0"/></>,
    kit:       <><path d="M12 2l9 5v10l-9 5-9-5V7z"/><path d="M12 2v20M3 7l9 5 9-5"/></>,
    palette:   <><path d="M12 3a9 9 0 00-9 9c0 5 4 9 9 9 1.5 0 2-1 2-2s-.5-2 0-3 2-1 3-1h1c2 0 3-1 3-3a9 9 0 00-9-9z"/><circle cx="7" cy="10" r="1"/><circle cx="12" cy="7" r="1"/><circle cx="17" cy="10" r="1"/></>,
    wand:      <><path d="M15 4V2M15 16v-2M8 9h2M20 9h2M17.8 11.8l1.4 1.4M11.8 5.8l1.4 1.4M15 9L3 21"/></>,
    printer:   <><path d="M6 9V4h12v5M6 18H4a1 1 0 01-1-1v-6a2 2 0 012-2h14a2 2 0 012 2v6a1 1 0 01-1 1h-2"/><rect x="6" y="14" width="12" height="7" rx="1"/></>,
    'map-pin': <><path d="M12 22s8-7.5 8-13a8 8 0 10-16 0c0 5.5 8 13 8 13z"/><circle cx="12" cy="9" r="2.5"/></>,
    accessibility: <><circle cx="12" cy="5" r="1.5"/><path d="M4 9l6 2v4l-2 7M20 9l-6 2v4l2 7M9 11h6"/></>,
    circle:    <><circle cx="12" cy="12" r="4"/></>,
  };
  const emoji = {
    dashboard: '📊', sites: '🌐', account: '👤', billing: '💳', requests: '💡',
    support: '🎧', scanner: '🔍', workspace: '💬', bell: '🔔', brain: '🧠',
    lock: '🔐', crown: '👑', team: '👥', modules: '🧩', brand: '🎨',
    building: '🏢', signout: '🚪', sun: '☀️', moon: '🌙', sliders: '⚙️',
    plus: '＋', check: '✓', x: '×', chevron: '›', 'chevron-down': '▾', 'chevron-right': '›', 'chevron-left': '‹', external: '↗', search: '🔍', info: 'ⓘ',
    warn: '⚠', spark: '⚡', globe: '🌐', activity: '📈', docs: '📄',
    shield: '🛡', flag: '🚩', clock: '🕒', ai: '🤖', download: '⬇',
    tasks: '📋', content: '📝', marketing: '📣', partners: '🤝', wiki: '📖', image: '🖼', redirect: '↪', sitebuilder: '🏗', notes: '📌', users: '👥', acquisition: '📈', mail: '✉',
  };
  const iconMode = document.body?.dataset?.icons || 'line';
  if (iconMode === 'emoji') {
    return <span style={{ fontSize: size, lineHeight: 1, ...style }} className={className} aria-hidden="true">{emoji[name] || '•'}</span>;
  }
  return <svg {...p} aria-hidden="true">{paths[name] || <circle cx="12" cy="12" r="2"/>}</svg>;
};

window.Icon = Icon;
