/* Lightweight icon set (Lucide-style stroke icons) */
const Icon = ({ name, size = 16, stroke = 1.6, style }) => {
  const s = stroke;
  const sz = { width: size, height: size };
  const common = {
    viewBox: "0 0 24 24",
    fill: "none",
    stroke: "currentColor",
    strokeWidth: s,
    strokeLinecap: "round",
    strokeLinejoin: "round",
    style,
    ...sz,
  };
  switch (name) {
    case "home": return (<svg {...common}><path d="M3 11.5 12 4l9 7.5"/><path d="M5 10v10h14V10"/></svg>);
    case "sku": return (<svg {...common}><path d="M3 7l9-4 9 4-9 4-9-4z"/><path d="M3 7v10l9 4 9-4V7"/><path d="M12 11v10"/></svg>);
    case "carton": return (<svg {...common}><path d="M4 7h16v12H4z"/><path d="M4 7l2-3h12l2 3"/><path d="M9 7v12"/><path d="M15 7v12"/></svg>);
    case "pallet": return (<svg {...common}><rect x="3" y="6" width="18" height="6" rx="1"/><path d="M5 12v6M12 12v6M19 12v6"/><path d="M4 18h16"/></svg>);
    case "container": return (<svg {...common}><rect x="2" y="6" width="20" height="12" rx="1"/><path d="M6 6v12M10 6v12M14 6v12M18 6v12"/></svg>);
    case "report": return (<svg {...common}><path d="M6 3h9l4 4v14H6z"/><path d="M15 3v5h4"/><path d="M9 13h6M9 17h6M9 9h2"/></svg>);
    case "settings": return (<svg {...common}><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.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.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.3h.1a1.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.8v.1a1.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"/></svg>);
    case "search": return (<svg {...common}><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>);
    case "filter": return (<svg {...common}><path d="M3 5h18l-7 9v6l-4-2v-4z"/></svg>);
    case "plus": return (<svg {...common}><path d="M12 5v14M5 12h14"/></svg>);
    case "upload": return (<svg {...common}><path d="M12 16V4M7 9l5-5 5 5"/><path d="M4 17v3h16v-3"/></svg>);
    case "download": return (<svg {...common}><path d="M12 4v12M7 11l5 5 5-5"/><path d="M4 17v3h16v-3"/></svg>);
    case "arrow-right": return (<svg {...common}><path d="M5 12h14M13 5l7 7-7 7"/></svg>);
    case "chevron-right": return (<svg {...common}><path d="M9 6l6 6-6 6"/></svg>);
    case "chevron-down": return (<svg {...common}><path d="M6 9l6 6 6-6"/></svg>);
    case "chevron-up": return (<svg {...common}><path d="M6 15l6-6 6 6"/></svg>);
    case "x": return (<svg {...common}><path d="M6 6l12 12M18 6 6 18"/></svg>);
    case "check": return (<svg {...common}><path d="M5 12l5 5 9-12"/></svg>);
    case "lock": return (<svg {...common}><rect x="5" y="11" width="14" height="9" rx="2"/><path d="M8 11V7a4 4 0 1 1 8 0v4"/></svg>);
    case "unlock": return (<svg {...common}><rect x="5" y="11" width="14" height="9" rx="2"/><path d="M8 11V7a4 4 0 1 1 8 0"/></svg>);
    case "rotate": return (<svg {...common}><path d="M4 12a8 8 0 0 1 14-5l3 3"/><path d="M20 4v6h-6"/><path d="M20 12a8 8 0 0 1-14 5l-3-3"/><path d="M4 20v-6h6"/></svg>);
    case "trash": return (<svg {...common}><path d="M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14"/></svg>);
    case "note": return (<svg {...common}><path d="M14 3H6v18h12V8z"/><path d="M14 3v5h4"/><path d="M9 13h6M9 17h4"/></svg>);
    case "warning": return (<svg {...common}><path d="M12 3 2 20h20z"/><path d="M12 9v5M12 17h.01"/></svg>);
    case "info": return (<svg {...common}><circle cx="12" cy="12" r="9"/><path d="M12 8h.01M11 12h1v5h1"/></svg>);
    case "axle": return (<svg {...common}><circle cx="6" cy="14" r="3"/><circle cx="18" cy="14" r="3"/><path d="M9 14h6"/><path d="M4 9h16v2H4z"/></svg>);
    case "cog-center": return (<svg {...common}><circle cx="12" cy="12" r="9"/><path d="M3 12h6M15 12h6M12 3v6M12 15v6"/></svg>);
    case "barrel": return (<svg {...common}><ellipse cx="12" cy="5" rx="6" ry="2"/><path d="M6 5v14a6 2 0 0 0 12 0V5"/><path d="M5 12h14"/></svg>);
    case "pipe": return (<svg {...common}><path d="M3 8h18v8H3z"/><path d="M3 12h18"/></svg>);
    case "roll": return (<svg {...common}><ellipse cx="6" cy="12" rx="3" ry="6"/><path d="M6 6h12a3 6 0 0 1 0 12H6"/></svg>);
    case "box": return (<svg {...common}><path d="M3 7l9-4 9 4v10l-9 4-9-4z"/><path d="M3 7l9 4 9-4M12 11v10"/></svg>);
    case "eye": return (<svg {...common}><path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z"/><circle cx="12" cy="12" r="3"/></svg>);
    case "eye-off": return (<svg {...common}><path d="m3 3 18 18"/><path d="M10.6 6.1A10 10 0 0 1 22 12s-1.3 2.6-4 4.6"/><path d="M6.6 6.6C3.8 8.5 2 12 2 12s3.5 7 10 7c2 0 3.7-.6 5.2-1.5"/><circle cx="12" cy="12" r="3"/></svg>);
    case "layers": return (<svg {...common}><path d="M12 3 2 8l10 5 10-5z"/><path d="m2 14 10 5 10-5"/></svg>);
    case "measure": return (<svg {...common}><rect x="2" y="9" width="20" height="6" rx="1"/><path d="M6 9v3M10 9v4M14 9v3M18 9v4"/></svg>);
    case "history": return (<svg {...common}><path d="M3 12a9 9 0 1 0 3-6.7L3 8"/><path d="M3 4v4h4"/><path d="M12 8v5l3 2"/></svg>);
    case "share": return (<svg {...common}><circle cx="6" cy="12" r="3"/><circle cx="18" cy="6" r="3"/><circle cx="18" cy="18" r="3"/><path d="M9 11l7-4M9 13l7 4"/></svg>);
    case "play": return (<svg {...common}><path d="M7 5v14l12-7z"/></svg>);
    case "panel-right": return (<svg {...common}><rect x="3" y="4" width="18" height="16" rx="1"/><path d="M15 4v16"/></svg>);
    case "panel-left": return (<svg {...common}><rect x="3" y="4" width="18" height="16" rx="1"/><path d="M9 4v16"/></svg>);
    case "user": return (<svg {...common}><circle cx="12" cy="8" r="4"/><path d="M4 21a8 8 0 0 1 16 0"/></svg>);
    case "bell": return (<svg {...common}><path d="M6 8a6 6 0 1 1 12 0c0 7 3 7 3 9H3c0-2 3-2 3-9z"/><path d="M10 21a2 2 0 0 0 4 0"/></svg>);
    case "expand": return (<svg {...common}><path d="M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5"/></svg>);
    case "drag": return (<svg {...common}><circle cx="9" cy="6" r="1"/><circle cx="9" cy="12" r="1"/><circle cx="9" cy="18" r="1"/><circle cx="15" cy="6" r="1"/><circle cx="15" cy="12" r="1"/><circle cx="15" cy="18" r="1"/></svg>);
    case "kebab": return (<svg {...common}><circle cx="12" cy="6" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="12" cy="18" r="1"/></svg>);
    case "wand": return (<svg {...common}><path d="M3 21 14 10"/><path d="M14 7l3 3M5 4l1 3 3 1-3 1-1 3-1-3-3-1 3-1zM18 14l.7 2 2 .7-2 .7-.7 2-.7-2-2-.7 2-.7z"/></svg>);
    case "scale": return (<svg {...common}><path d="M12 3v18"/><path d="M5 7h14"/><path d="M5 7 2 13a4 4 0 0 0 6 0z"/><path d="M19 7l-3 6a4 4 0 0 0 6 0z"/></svg>);
    case "flag": return (<svg {...common}><path d="M5 21V4h12l-2 4 2 4H5"/></svg>);
    case "grid": return (<svg {...common}><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/></svg>);
    case "list": return (<svg {...common}><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"/></svg>);
    case "scissors": return (<svg {...common}><circle cx="6" cy="6" r="3"/><circle cx="6" cy="18" r="3"/><path d="M20 4 8 16M14 14l6 6M14 10l6-6"/></svg>);
    default: return (<svg {...common}><rect x="3" y="3" width="18" height="18"/></svg>);
  }
};

window.Icon = Icon;
