// Small inline-SVG icon set. Usage: <Icon name="search" size={18} />
const Icon = ({ name, size = 20, stroke = 1.6, className, style }) => {
  const s = { width: size, height: size, ...style };
  const p = { fill: "none", stroke: "currentColor", strokeWidth: stroke, strokeLinecap: "round", strokeLinejoin: "round" };
  switch (name) {
    case "search":
      return <svg viewBox="0 0 24 24" style={s} className={className}><circle cx="11" cy="11" r="7" {...p}/><path d="M20 20l-3.5-3.5" {...p}/></svg>;
    case "heart":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M12 21s-7-4.35-9.33-9.2A5 5 0 0112 5.6a5 5 0 019.33 6.2C19 16.65 12 21 12 21z" {...p}/></svg>;
    case "heart-fill":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M12 21s-7-4.35-9.33-9.2A5 5 0 0112 5.6a5 5 0 019.33 6.2C19 16.65 12 21 12 21z" fill="currentColor"/></svg>;
    case "star":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M12 3l2.7 5.7 6.3.9-4.6 4.5 1.1 6.3L12 17.5 6.5 20.4l1.1-6.3L3 9.6l6.3-.9L12 3z" fill="currentColor"/></svg>;
    case "menu":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M4 7h16M4 12h16M4 17h16" {...p}/></svg>;
    case "user":
      return <svg viewBox="0 0 24 24" style={s} className={className}><circle cx="12" cy="8" r="4" {...p}/><path d="M4 20c1.5-3.5 5-5 8-5s6.5 1.5 8 5" {...p}/></svg>;
    case "pin":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M12 21s-7-7.5-7-12a7 7 0 0114 0c0 4.5-7 12-7 12z" {...p}/><circle cx="12" cy="9" r="2.5" {...p}/></svg>;
    case "cal":
      return <svg viewBox="0 0 24 24" style={s} className={className}><rect x="3" y="5" width="18" height="16" rx="2" {...p}/><path d="M3 10h18M8 3v4M16 3v4" {...p}/></svg>;
    case "people":
      return <svg viewBox="0 0 24 24" style={s} className={className}><circle cx="9" cy="8" r="3.5" {...p}/><path d="M2.5 19c.9-3 3.5-4.5 6.5-4.5s5.6 1.5 6.5 4.5" {...p}/><path d="M16 5.5a3 3 0 010 6M18 19c-.2-1.8-.9-3.3-2-4.3" {...p}/></svg>;
    case "home":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M3 11l9-8 9 8M5 10v10h14V10" {...p}/></svg>;
    case "building":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M4 21V5a1 1 0 011-1h9a1 1 0 011 1v16M15 21V11h4a1 1 0 011 1v9" {...p}/><path d="M7 8h3M7 12h3M7 16h3M17 14h0M17 17h0" {...p}/></svg>;
    case "bed":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M3 18v-7a2 2 0 012-2h10a4 4 0 014 4v5M3 14h18M3 18h18" {...p}/></svg>;
    case "briefcase":
      return <svg viewBox="0 0 24 24" style={s} className={className}><rect x="3" y="7" width="18" height="13" rx="2" {...p}/><path d="M9 7V5a2 2 0 012-2h2a2 2 0 012 2v2" {...p}/></svg>;
    case "laptop":
      return <svg viewBox="0 0 24 24" style={s} className={className}><rect x="4" y="5" width="16" height="11" rx="2" {...p}/><path d="M2 19h20" {...p}/></svg>;
    case "globe":
      return <svg viewBox="0 0 24 24" style={s} className={className}><circle cx="12" cy="12" r="9" {...p}/><path d="M3 12h18M12 3c3 3.5 3 13.5 0 18M12 3c-3 3.5-3 13.5 0 18" {...p}/></svg>;
    case "sparkle":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M12 3v4M12 17v4M3 12h4M17 12h4M6 6l2.5 2.5M15.5 15.5L18 18M6 18l2.5-2.5M15.5 8.5L18 6" {...p}/></svg>;
    case "crown":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M3 8l4 4 5-7 5 7 4-4-2 11H5L3 8z" {...p}/></svg>;
    case "new":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M12 3l2 5 5 .5-3.8 3.4 1.2 5.1L12 14.5 7.6 17l1.2-5.1L5 8.5l5-.5L12 3z" {...p}/></svg>;
    case "paw":
      return <svg viewBox="0 0 24 24" style={s} className={className}><circle cx="6" cy="10" r="1.8" {...p}/><circle cx="10" cy="5" r="1.8" {...p}/><circle cx="14" cy="5" r="1.8" {...p}/><circle cx="18" cy="10" r="1.8" {...p}/><path d="M7 18c0-3 2-5 5-5s5 2 5 5c0 2-2 2-5 2s-5 0-5-2z" {...p}/></svg>;
    case "wave":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M3 12c2 0 2-2 4-2s2 2 4 2 2-2 4-2 2 2 4 2M3 17c2 0 2-2 4-2s2 2 4 2 2-2 4-2 2 2 4 2" {...p}/></svg>;
    case "leaf":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M4 20c0-8 6-14 16-14-.5 9-6 14-14 14" {...p}/><path d="M4 20l8-8" {...p}/></svg>;
    case "family":
      return <svg viewBox="0 0 24 24" style={s} className={className}><circle cx="8" cy="7" r="2.5" {...p}/><circle cx="16" cy="7" r="2.5" {...p}/><path d="M3 19c0-3 2-5 5-5s5 2 5 5M13 19c0-3 2-5 5-5s3 2 3 5" {...p}/></svg>;
    case "wifi":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M3 9c5-5 13-5 18 0M6 13c3.5-3.5 8.5-3.5 12 0M9 17c2-2 4-2 6 0" {...p}/><circle cx="12" cy="20" r="1" fill="currentColor"/></svg>;
    case "key":
      return <svg viewBox="0 0 24 24" style={s} className={className}><circle cx="8" cy="14" r="4" {...p}/><path d="M11.5 11.5L20 3M16 7l3 3" {...p}/></svg>;
    case "shield":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M12 3l8 3v5c0 5-3.5 9-8 10-4.5-1-8-5-8-10V6l8-3z" {...p}/></svg>;
    case "kitchen":
      return <svg viewBox="0 0 24 24" style={s} className={className}><rect x="5" y="3" width="14" height="18" rx="2" {...p}/><path d="M5 10h14M9 6.5v0M9 14.5v0" {...p}/></svg>;
    case "washer":
      return <svg viewBox="0 0 24 24" style={s} className={className}><rect x="5" y="3" width="14" height="18" rx="2" {...p}/><circle cx="12" cy="14" r="4" {...p}/><circle cx="8" cy="7" r=".5" fill="currentColor"/></svg>;
    case "ac":
      return <svg viewBox="0 0 24 24" style={s} className={className}><rect x="3" y="6" width="18" height="8" rx="2" {...p}/><path d="M6 18v1M10 18v2M14 18v2M18 18v1" {...p}/></svg>;
    case "tv":
      return <svg viewBox="0 0 24 24" style={s} className={className}><rect x="3" y="5" width="18" height="12" rx="2" {...p}/><path d="M8 21h8" {...p}/></svg>;
    case "heat":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M12 3v5M12 3c-3 3-3 6 0 9s3 6 0 9M7 8c-2 2-2 5 0 7M17 8c2 2 2 5 0 7" {...p}/></svg>;
    case "parking":
      return <svg viewBox="0 0 24 24" style={s} className={className}><rect x="4" y="4" width="16" height="16" rx="3" {...p}/><path d="M10 17V7h3a3 3 0 010 6h-3" {...p}/></svg>;
    case "gym":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M6 8v8M4 10v4M18 8v8M20 10v4M6 12h12" {...p}/></svg>;
    case "bath":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M4 11h16v4a4 4 0 01-4 4H8a4 4 0 01-4-4v-4zM6 11V6a2 2 0 014 0" {...p}/></svg>;
    case "sauna":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M4 18h16M6 14c1-2 3-2 4 0s3 2 4 0 3-2 4 0M6 10c1-2 3-2 4 0s3 2 4 0 3-2 4 0" {...p}/></svg>;
    case "chev-right":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M9 6l6 6-6 6" {...p}/></svg>;
    case "chev-left":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M15 6l-6 6 6 6" {...p}/></svg>;
    case "chev-down":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M6 9l6 6 6-6" {...p}/></svg>;
    case "sliders":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M4 7h10M18 7h2M4 17h2M10 17h10" {...p}/><circle cx="16" cy="7" r="2" {...p}/><circle cx="8" cy="17" r="2" {...p}/></svg>;
    case "close":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M6 6l12 12M18 6L6 18" {...p}/></svg>;
    case "share":
      return <svg viewBox="0 0 24 24" style={s} className={className}><circle cx="6" cy="12" r="2.5" {...p}/><circle cx="18" cy="6" r="2.5" {...p}/><circle cx="18" cy="18" r="2.5" {...p}/><path d="M8 11l8-4M8 13l8 4" {...p}/></svg>;
    case "settings":
      return <svg viewBox="0 0 24 24" style={s} className={className}><circle cx="12" cy="12" r="3" {...p}/><path d="M12 3v2M12 19v2M3 12h2M19 12h2M5.6 5.6l1.5 1.5M16.9 16.9l1.5 1.5M5.6 18.4l1.5-1.5M16.9 7.1l1.5-1.5" {...p}/></svg>;
    case "plus":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M12 5v14M5 12h14" {...p}/></svg>;
    case "minus":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M5 12h14" {...p}/></svg>;
    case "check":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M5 12l4 4 10-10" {...p}/></svg>;
    case "file":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M14 3H7a2 2 0 00-2 2v14a2 2 0 002 2h10a2 2 0 002-2V8z" {...p}/><path d="M14 3v5h5M9 12h6M9 16h4" {...p}/></svg>;
    case "chat":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z" {...p}/></svg>;
    case "logout":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4M16 17l5-5-5-5M21 12H9" {...p}/></svg>;
    case "bell":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M18 8a6 6 0 10-12 0c0 7-3 9-3 9h18s-3-2-3-9M13.7 21a2 2 0 01-3.4 0" {...p}/></svg>;
    case "receipt":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M4 2h16v20l-2-1-2 1-2-1-2 1-2-1-2 1-2-1-2 1V2z" {...p}/><path d="M8 7h8M8 11h6M8 15h4" {...p}/></svg>;
    case "eye":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z" {...p}/><circle cx="12" cy="12" r="3" {...p}/></svg>;
    case "eye-off":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M17.9 17.9A10.5 10.5 0 0112 19C5 19 1 12 1 12a18.5 18.5 0 015-5.5M9.9 4.2A9.8 9.8 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.1 3.3M1 1l22 22" {...p}/></svg>;
    case "list-view":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M9 6h11M9 12h11M9 18h11M4 6h0M4 12h0M4 18h0" {...p} strokeWidth={stroke * 1.5}/></svg>;
    case "map-view":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M3 7l6-3 6 3 6-3v13l-6 3-6-3-6 3V7zM9 4v13M15 7v13" {...p}/></svg>;
    case "bus":
      return <svg viewBox="0 0 24 24" style={s} className={className}><rect x="3" y="4" width="18" height="13" rx="2" {...p}/><path d="M3 9h18M8 17v3M16 17v3M3 13h18" {...p}/><circle cx="8" cy="15" r="1" fill="currentColor"/><circle cx="16" cy="15" r="1" fill="currentColor"/></svg>;
    case "grocery":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M6 2L3 6v14a2 2 0 002 2h14a2 2 0 002-2V6l-3-4zM3 6h18" {...p}/><path d="M16 10a4 4 0 01-8 0" {...p}/></svg>;
    case "fork-knife":
      return <svg viewBox="0 0 24 24" style={s} className={className}><path d="M3 2v7c0 2.2 1.8 4 4 4v9M7 2v7M11 2v7c0 2.2-1.8 4-4 4M15 2c0 0 4 3 4 9H15M15 11v11" {...p}/></svg>;
    default:
      return <svg viewBox="0 0 24 24" style={s}><rect x="3" y="3" width="18" height="18" {...p}/></svg>;
  }
};

Object.assign(window, { Icon });
