/* global React */
/**
 * Inline SVG icon set — Lucide-style strokes, 1.5 width, tuned for 14-16px.
 * Usage: <Icon name="mic" size={14} />
 */
function Icon({ name, size = 14, color = "currentColor", ...props }) {
  const s = size;
  const common = {
    width: s, height: s,
    viewBox: "0 0 24 24",
    fill: "none",
    stroke: color,
    strokeWidth: 1.6,
    strokeLinecap: "round",
    strokeLinejoin: "round",
    ...props,
  };
  switch (name) {
    case "sliders":
      return <svg {...common}><path d="M4 6h12M4 12h6M4 18h14"/><circle cx="18" cy="6" r="2"/><circle cx="13" cy="12" r="2"/><circle cx="20" cy="18" r="2"/></svg>;
    case "keyboard":
      return <svg {...common}><rect x="2" y="6" width="20" height="12" rx="2"/><path d="M6 10h.01M10 10h.01M14 10h.01M18 10h.01M6 14h12"/></svg>;
    case "mic":
      return <svg {...common}><rect x="9" y="3" width="6" height="12" rx="3"/><path d="M5 11a7 7 0 0 0 14 0M12 18v3M8 21h8"/></svg>;
    case "cpu":
      return <svg {...common}><rect x="5" y="5" width="14" height="14" rx="2"/><rect x="9" y="9" width="6" height="6"/><path d="M9 2v3M15 2v3M9 19v3M15 19v3M2 9h3M2 15h3M19 9h3M19 15h3"/></svg>;
    case "book":
      return <svg {...common}><path d="M4 4v16a2 2 0 0 0 2 2h14V4H6a2 2 0 0 0-2 2Z"/><path d="M4 18h14"/></svg>;
    case "sparkle":
      return <svg {...common}><path d="M12 3l2 5 5 2-5 2-2 5-2-5-5-2 5-2 2-5Z"/><path d="M19 14l.8 1.8L22 17l-2.2.8L19 20l-.8-2.2L16 17l2.2-.8Z"/></svg>;
    case "clock":
      return <svg {...common}><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></svg>;
    case "shield":
      return <svg {...common}><path d="M12 3l8 4v5c0 5-4 8-8 9-4-1-8-4-8-9V7l8-4Z"/><path d="M9 12l2 2 4-4"/></svg>;
    case "info":
      return <svg {...common}><circle cx="12" cy="12" r="9"/><path d="M12 11v5M12 8h.01"/></svg>;
    case "cloud":
      return <svg {...common}><path d="M7 18a4 4 0 0 1 .5-8 5 5 0 0 1 9.7 1A4 4 0 0 1 17 18H7Z"/></svg>;
    case "cloud-off":
      return <svg {...common}><path d="M3 3l18 18M7 18a4 4 0 0 1 .5-8M10.5 5.5A5 5 0 0 1 17.2 11a4 4 0 0 1-.2 7"/></svg>;
    case "chevron-down":
      return <svg {...common}><path d="M6 9l6 6 6-6"/></svg>;
    case "chevron-right":
      return <svg {...common}><path d="M9 6l6 6-6 6"/></svg>;
    case "check":
      return <svg {...common}><path d="M5 12l5 5 9-10"/></svg>;
    case "pencil":
      return <svg {...common}><path d="M15 3l6 6-12 12H3v-6L15 3Z"/></svg>;
    case "plus":
      return <svg {...common}><path d="M12 5v14M5 12h14"/></svg>;
    case "mic-fill":
      return <svg {...common} fill="currentColor" stroke="none"><rect x="9" y="3" width="6" height="12" rx="3"/><path d="M5 11a7 7 0 0 0 14 0M12 18v3M8 21h8" fill="none" stroke="currentColor"/></svg>;
    case "arrow-right":
      return <svg {...common}><path d="M5 12h14M13 6l6 6-6 6"/></svg>;
    case "arrow-left":
      return <svg {...common}><path d="M19 12H5M11 6l-6 6 6 6"/></svg>;
    case "lock":
      return <svg {...common}><rect x="5" y="11" width="14" height="10" rx="2"/><path d="M8 11V8a4 4 0 0 1 8 0v3"/></svg>;
    case "zap":
      return <svg {...common}><path d="M13 2L4 14h7l-1 8 9-12h-7l1-8Z"/></svg>;
    case "layers":
      return <svg {...common}><path d="M12 3l9 5-9 5-9-5 9-5ZM3 13l9 5 9-5M3 18l9 5 9-5"/></svg>;
    case "apple":
      return <svg {...common}><path d="M12 4a3 3 0 0 1 3-3M8 10c-3 0-5 3-5 6 0 4 3 7 5 7 1 0 2-1 4-1s3 1 4 1c2 0 5-3 5-7 0-3-2-6-5-6-2 0-3 1-4 1s-2-1-4-1Z"/></svg>;
    case "windows":
      return <svg {...common}><path d="M3 5l8-1v7H3V5ZM13 4l8-1v8h-8V4ZM3 12h8v7l-8-1v-6ZM13 12h8v8l-8-1v-7Z"/></svg>;
    case "globe":
      return <svg {...common}><circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18"/></svg>;
    case "x":
      return <svg {...common}><path d="M6 6l12 12M18 6L6 18"/></svg>;
    case "sun":
      return <svg {...common}><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"/></svg>;
    case "moon":
      return <svg {...common}><path d="M20 14A8 8 0 1 1 10 4a7 7 0 0 0 10 10Z"/></svg>;
    case "copy":
      return <svg {...common}><rect x="8" y="8" width="12" height="12" rx="2"/><path d="M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2"/></svg>;
    default:
      return <svg {...common}><circle cx="12" cy="12" r="8"/></svg>;
  }
}

window.Icon = Icon;
