/* Inline SVG icons. Stroke-based, 1.75 weight, 24x24 viewbox. */
const Ic = (props) => {
  const { name, size = 20, color = 'currentColor', strokeWidth = 1.75, style, className, ...rest } = props;
  const sw = strokeWidth;
  const common = {
    width: size,
    height: size,
    viewBox: '0 0 24 24',
    fill: 'none',
    stroke: color,
    strokeWidth: sw,
    strokeLinecap: 'round',
    strokeLinejoin: 'round',
    style,
    className,
    ...rest,
  };
  const map = {
    home: <path d="M3 11l9-8 9 8v9a2 2 0 0 1-2 2h-4v-7h-6v7H5a2 2 0 0 1-2-2v-9z"/>,
    grid: <g><rect x="3" y="3" width="7" height="7" rx="1.5"/><rect x="14" y="3" width="7" height="7" rx="1.5"/><rect x="3" y="14" width="7" height="7" rx="1.5"/><rect x="14" y="14" width="7" height="7" rx="1.5"/></g>,
    chart: <g><path d="M3 21h18"/><rect x="5" y="11" width="3" height="8" rx="1"/><rect x="10.5" y="6" width="3" height="13" rx="1"/><rect x="16" y="14" width="3" height="5" rx="1"/></g>,
    bell: <g><path d="M6 8a6 6 0 0 1 12 0c0 6 3 7 3 7H3s3-1 3-7"/><path d="M10.5 19a1.5 1.5 0 0 0 3 0"/></g>,
    gear: <g><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"/></g>,
    droplet: <path d="M12 3s6 6.5 6 11a6 6 0 1 1-12 0c0-4.5 6-11 6-11z"/>,
    waves: <g><path d="M2 8c2 0 2-1.5 4-1.5S8 8 10 8s2-1.5 4-1.5S16 8 18 8s2-1.5 4-1.5"/><path d="M2 14c2 0 2-1.5 4-1.5S8 14 10 14s2-1.5 4-1.5S16 14 18 14s2-1.5 4-1.5"/><path d="M2 20c2 0 2-1.5 4-1.5S8 20 10 20s2-1.5 4-1.5S16 20 18 20s2-1.5 4-1.5"/></g>,
    power: <g><path d="M12 2v10"/><path d="M18.4 6.6a9 9 0 1 1-12.8 0"/></g>,
    plus: <g><path d="M12 5v14"/><path d="M5 12h14"/></g>,
    wifi: <g><path d="M5 12.55a11 11 0 0 1 14 0"/><path d="M2 8.5a16 16 0 0 1 20 0"/><path d="M8.5 16.5a6 6 0 0 1 7 0"/><circle cx="12" cy="20" r="0.5" fill={color}/></g>,
    wifiOff: <g><path d="M2 8.5a16 16 0 0 1 7-3"/><path d="M19 12.55a11 11 0 0 0-3.5-2.2"/><path d="M3 3l18 18"/><circle cx="12" cy="20" r="0.5" fill={color}/></g>,
    zap: <path d="M13 2L4 14h7l-1 8 9-12h-7l1-8z"/>,
    thermometer: <path d="M14 14V4a2 2 0 1 0-4 0v10a4 4 0 1 0 4 0z"/>,
    clock: <g><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></g>,
    activity: <path d="M22 12h-4l-3 9-6-18-3 9H2"/>,
    chevronLeft: <path d="M15 18l-6-6 6-6"/>,
    chevronRight: <path d="M9 18l6-6-6-6"/>,
    chevronDown: <path d="M6 9l6 6 6-6"/>,
    edit: <g><path d="M12 20h9"/><path d="M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z"/></g>,
    trash: <g><path d="M3 6h18"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"/></g>,
    alert: <g><path d="M12 9v4"/><path d="M12 17h.01"/><path d="M10.3 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/></g>,
    check: <path d="M5 13l4 4L19 7"/>,
    checkCircle: <g><circle cx="12" cy="12" r="9"/><path d="M8 12l3 3 5-6"/></g>,
    info: <g><circle cx="12" cy="12" r="9"/><path d="M12 16v-4"/><path d="M12 8h.01"/></g>,
    x: <g><path d="M18 6L6 18"/><path d="M6 6l18 18" transform="translate(-6 -6)"/></g>,
    menu: <g><path d="M3 6h18"/><path d="M3 12h18"/><path d="M3 18h18"/></g>,
    search: <g><circle cx="11" cy="11" r="7"/><path d="M21 21l-4.3-4.3"/></g>,
    filter: <path d="M3 4h18l-7 9v6l-4 2v-8L3 4z"/>,
    more: <g><circle cx="12" cy="6" r="1.2" fill={color}/><circle cx="12" cy="12" r="1.2" fill={color}/><circle cx="12" cy="18" r="1.2" fill={color}/></g>,
    refresh: <g><path d="M21 12a9 9 0 1 1-3-6.7"/><path d="M21 4v5h-5"/></g>,
    shield: <path d="M12 2l8 4v6c0 5-3.5 9-8 10-4.5-1-8-5-8-10V6l8-4z"/>,
    gauge: <g><circle cx="12" cy="13" r="8"/><path d="M12 13l4-4"/><path d="M8 3h8"/></g>,
    qr: <g><rect x="3" y="3" width="6" height="6" rx="1"/><rect x="15" y="3" width="6" height="6" rx="1"/><rect x="3" y="15" width="6" height="6" rx="1"/><path d="M15 15h2v2h-2z"/><path d="M19 15h2v2"/><path d="M15 19h2v2"/><path d="M19 19h2v2"/></g>,
    pipe: <g><path d="M3 12h6"/><path d="M15 12h6"/><rect x="9" y="8" width="6" height="8" rx="1"/></g>,
    eye: <g><path d="M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12z"/><circle cx="12" cy="12" r="3"/></g>,
    eyeOff: <g><path d="M9.88 9.88a3 3 0 0 0 4.24 4.24"/><path d="M10.73 5.08A10.4 10.4 0 0 1 12 5c6 0 10 7 10 7a13 13 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13 13 0 0 0 2 12s4 7 10 7a10 10 0 0 0 5.39-1.61"/><path d="M3 3l18 18"/></g>,
    user: <g><circle cx="12" cy="8" r="4"/><path d="M4 21a8 8 0 0 1 16 0"/></g>,
    userX: <g><circle cx="10" cy="8" r="4"/><path d="M3 21a7 7 0 0 1 14 0"/><path d="M18 6l4 4m0-4-4 4" strokeLinecap="round"/></g>,
    users: <g><circle cx="9" cy="8" r="3.5"/><path d="M2 21a7 7 0 0 1 14 0"/><circle cx="17" cy="8" r="3"/><path d="M22 21a5 5 0 0 0-5-5"/></g>,
    bolt: <path d="M13 2L4 14h7l-1 8 9-12h-7l1-8z"/>,
    arrowRight: <g><path d="M5 12h14"/><path d="M13 5l7 7-7 7"/></g>,
    plug: <g><path d="M9 2v4"/><path d="M15 2v4"/><path d="M6 6h12v4a6 6 0 1 1-12 0V6z"/><path d="M12 16v6"/></g>,
    flame: <path d="M12 2s4 4 4 9a4 4 0 1 1-8 0c0-2 1-3 1-3s-2-2-2-5c0 0 4 2 5-1z"/>,
    target: <g><circle cx="12" cy="12" r="9"/><circle cx="12" cy="12" r="5"/><circle cx="12" cy="12" r="1.5" fill={color}/></g>,
    sparkle: <g><path d="M12 3v4"/><path d="M12 17v4"/><path d="M3 12h4"/><path d="M17 12h4"/><path d="M5.6 5.6l2.8 2.8"/><path d="M15.6 15.6l2.8 2.8"/><path d="M5.6 18.4l2.8-2.8"/><path d="M15.6 8.4l2.8-2.8"/></g>,
    calendar: <g><rect x="3" y="5" width="18" height="16" rx="2"/><path d="M3 9h18"/><path d="M8 3v4"/><path d="M16 3v4"/></g>,
    globe: <g><circle cx="12" cy="12" r="9"/><path d="M3 12h18"/><path d="M12 3a14 14 0 0 1 0 18 14 14 0 0 1 0-18z"/></g>,
    moon: <path d="M21 13A9 9 0 1 1 11 3a7 7 0 0 0 10 10z"/>,
    sun: <g><circle cx="12" cy="12" r="4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="M2 12h2"/><path d="M20 12h2"/><path d="M5 5l1.5 1.5"/><path d="M17.5 17.5L19 19"/><path d="M5 19l1.5-1.5"/><path d="M17.5 6.5L19 5"/></g>,
    rupee: <g><path d="M6 4h12"/><path d="M6 8h12"/><path d="M14 4c0 4-3 6-7 6h-1l8 10"/></g>,
    play: <path d="M6 4l14 8-14 8V4z"/>,
    pause: <g><rect x="6" y="4" width="4" height="16" rx="1"/><rect x="14" y="4" width="4" height="16" rx="1"/></g>,
    plusCircle: <g><circle cx="12" cy="12" r="9"/><path d="M12 8v8"/><path d="M8 12h8"/></g>,
    download: <g><path d="M12 3v12"/><path d="M7 11l5 5 5-5"/><path d="M5 21h14"/></g>,
    site: <g><path d="M3 21h18"/><path d="M5 21V8l7-5 7 5v13"/><rect x="9" y="13" width="6" height="8"/></g>,
    leaf: <path d="M11 20A8 8 0 0 1 3 12c0-7 9-9 18-9 0 9-2 18-9 18a4 4 0 0 1-4-4c0-3 4-4 9-9"/>,
    factory: <g><path d="M3 21h18"/><path d="M3 21V10l5 3v-3l5 3v-3l5 3v11"/></g>,
    sprout: <g><path d="M12 21v-8"/><path d="M12 13c-3 0-5-2-5-5h2c0 2 1 3 3 3"/><path d="M12 13c3 0 5-2 5-5h-2c0 2-1 3-3 3"/></g>,
    chevUp: <path d="M18 15l-6-6-6 6"/>,
    radio: <g><circle cx="12" cy="12" r="2"/><path d="M16.24 7.76a6 6 0 0 1 0 8.49"/><path d="M7.76 16.24a6 6 0 0 1 0-8.48"/><path d="M19.07 4.93a10 10 0 0 1 0 14.14"/><path d="M4.93 19.07a10 10 0 0 1 0-14.14"/></g>,
    battery: <g><rect x="2" y="7" width="18" height="10" rx="2"/><path d="M22 11v2"/></g>,
    mail:    <g><rect x="2" y="4" width="20" height="16" rx="2"/><path d="M2 7l10 7 10-7"/></g>,
    logout:  <g><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><path d="M16 17l5-5-5-5"/><path d="M21 12H9"/></g>,
    tool:    <g><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/></g>,
    tag:     <g><path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"/><circle cx="7" cy="7" r="1.2" fill={color}/></g>,
    layers:  <g><polygon points="12 2 2 7 12 12 22 7 12 2"/><polyline points="2 17 12 22 22 17"/><polyline points="2 12 12 17 22 12"/></g>,
    hub: <g>
      <circle cx="12" cy="12" r="3"/>
      <circle cx="4"  cy="4"  r="2"/>
      <circle cx="20" cy="4"  r="2"/>
      <circle cx="4"  cy="20" r="2"/>
      <circle cx="20" cy="20" r="2"/>
      <line x1="9.88"  y1="9.88"  x2="5.41"  y2="5.41"/>
      <line x1="14.12" y1="9.88"  x2="18.59" y2="5.41"/>
      <line x1="9.88"  y1="14.12" x2="5.41"  y2="18.59"/>
      <line x1="14.12" y1="14.12" x2="18.59" y2="18.59"/>
    </g>,
  };
  return <svg {...common}>{map[name] || null}</svg>;
};

window.Ic = Ic;
