// ====== Icons (inline SVG, currentColor) ======
const Ic = ({ name, size = 16, stroke = 1.6 }) => {
  const p = {
    width: size, height: size, viewBox: "0 0 24 24",
    fill: "none", stroke: "currentColor", strokeWidth: stroke,
    strokeLinecap: "round", strokeLinejoin: "round",
  };
  switch (name) {
    case "dashboard": return (
      <svg {...p}><path d="M3 13a9 9 0 0 1 18 0"/><path d="M12 13l4-4"/><circle cx="12" cy="13" r="1.2" fill="currentColor"/></svg>
    );
    case "orders": return (
      <svg {...p}><path d="M5 7h14l-1.2 11.2a2 2 0 0 1-2 1.8h-7.6a2 2 0 0 1-2-1.8L5 7Z"/><path d="M9 7V5a3 3 0 0 1 6 0v2"/></svg>
    );
    case "menu": return (
      <svg {...p}><path d="M7 3v18"/><path d="M7 3c2 0 3 2 3 5s-1 5-3 5"/><path d="M17 3v18"/><path d="M14 3h6v6h-6z" transform="translate(-2)"/></svg>
    );
    case "inventory": return (
      <svg {...p}><path d="M3 7l9-4 9 4-9 4-9-4Z"/><path d="M3 7v10l9 4 9-4V7"/><path d="M12 11v10"/></svg>
    );
    case "customers": return (
      <svg {...p}><circle cx="9" cy="9" r="3.2"/><path d="M3.5 19a5.5 5.5 0 0 1 11 0"/><path d="M16 11a3 3 0 1 0 0-6"/><path d="M21 19a4.5 4.5 0 0 0-6-4.2"/></svg>
    );
    case "promotions": return (
      <svg {...p}><path d="M20 4h-7l-9 9 7 7 9-9V4Z"/><circle cx="16" cy="8" r="1.4"/></svg>
    );
    case "staff": return (
      <svg {...p}><circle cx="12" cy="8" r="3.5"/><path d="M5 20a7 7 0 0 1 14 0"/></svg>
    );
    case "settings": return (
      <svg {...p}><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.3h.1A1.7 1.7 0 0 0 10 3.1V3a2 2 0 1 1 4 0v.1A1.7 1.7 0 0 0 15 4.6h.1a1.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 20.9 10H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1Z"/></svg>
    );
    case "search": return (
      <svg {...p}><circle cx="11" cy="11" r="7"/><path d="m21 21-4.3-4.3"/></svg>
    );
    case "bell": return (
      <svg {...p}><path d="M6 8a6 6 0 0 1 12 0c0 7 3 8 3 8H3s3-1 3-8"/><path d="M10 21a2 2 0 0 0 4 0"/></svg>
    );
    case "plus": return (
      <svg {...p}><path d="M12 5v14M5 12h14"/></svg>
    );
    case "filter": return (
      <svg {...p}><path d="M3 5h18l-7 9v6l-4-2v-4L3 5Z"/></svg>
    );
    case "calendar": return (
      <svg {...p}><rect x="3" y="5" width="18" height="16" rx="2"/><path d="M3 9h18"/><path d="M8 3v4M16 3v4"/></svg>
    );
    case "image": return (
      <svg {...p}><rect x="3" y="5" width="18" height="14" rx="2"/><circle cx="8.5" cy="10" r="1.5"/><path d="m21 15-4.5-4.5L9 18"/></svg>
    );
    case "lock": return (
      <svg {...p}><rect x="5" y="11" width="14" height="10" rx="2"/><path d="M8 11V8a4 4 0 0 1 8 0v3"/></svg>
    );
    case "link": return (
      <svg {...p}><path d="M10 13a5 5 0 0 0 7.1 0l2-2a5 5 0 0 0-7.1-7.1l-1.1 1.1"/><path d="M14 11a5 5 0 0 0-7.1 0l-2 2A5 5 0 0 0 12 20.1l1.1-1.1"/></svg>
    );
    case "globe": return (
      <svg {...p}><circle cx="12" cy="12" r="9"/><path d="M3 12h18"/><path d="M12 3a13 13 0 0 1 0 18"/><path d="M12 3a13 13 0 0 0 0 18"/></svg>
    );
    case "refresh": return (
      <svg {...p}><path d="M20 11a8 8 0 0 0-14.9-3"/><path d="M5 4v4h4"/><path d="M4 13a8 8 0 0 0 14.9 3"/><path d="M19 20v-4h-4"/></svg>
    );
    case "arrow-up": return (
      <svg {...p}><path d="M12 19V5"/><path d="m5 12 7-7 7 7"/></svg>
    );
    case "arrow-down": return (
      <svg {...p}><path d="M12 5v14"/><path d="m5 12 7 7 7-7"/></svg>
    );
    case "arrow-right": return (
      <svg {...p}><path d="M5 12h14"/><path d="m12 5 7 7-7 7"/></svg>
    );
    case "check": return (
      <svg {...p}><path d="m5 12 5 5L20 7"/></svg>
    );
    case "x": return (
      <svg {...p}><path d="M6 6l12 12M18 6 6 18"/></svg>
    );
    case "leaf": return (
      <svg {...p}><path d="M4 20c0-8 6-14 16-14 0 10-6 16-14 16-2 0-2-2-2-2Z"/><path d="M4 20c4-4 8-8 12-12"/></svg>
    );
    case "cup": return (
      <svg {...p}><path d="M6 8h12l-1 11a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2L6 8Z"/><path d="M18 11h2a2 2 0 0 1 0 4h-2"/><circle cx="10" cy="14" r="1" fill="currentColor"/><circle cx="13" cy="16" r=".8" fill="currentColor"/></svg>
    );
    case "money": return (
      <svg {...p}><rect x="3" y="6" width="18" height="12" rx="2"/><circle cx="12" cy="12" r="2.4"/><path d="M6 9v6M18 9v6"/></svg>
    );
    case "print": return (
      <svg {...p}><path d="M7 8V3h10v5"/><rect x="5" y="13" width="14" height="8" rx="1.5"/><path d="M7 17h10"/><path d="M5 17H3V9h18v8h-2"/><circle cx="17" cy="11" r=".8" fill="currentColor"/></svg>
    );
    case "clock": return (
      <svg {...p}><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></svg>
    );
    case "star": return (
      <svg {...p}><path d="m12 3 2.6 5.6 6 .6-4.5 4.2 1.3 6L12 16.8 6.6 19.4 8 13.4 3.4 9.2l6-.6L12 3Z"/></svg>
    );
    case "edit": return (
      <svg {...p}><path d="M4 20h4l11-11-4-4L4 16v4Z"/><path d="m13 5 4 4"/></svg>
    );
    case "trash": return (
      <svg {...p}><path d="M3 6h18"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><path d="m6 6 1 14a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-14"/></svg>
    );
    case "dots": return (
      <svg {...p}><circle cx="6" cy="12" r="1.4" fill="currentColor"/><circle cx="12" cy="12" r="1.4" fill="currentColor"/><circle cx="18" cy="12" r="1.4" fill="currentColor"/></svg>
    );
    case "phone": return (
      <svg {...p}><path d="M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1.9.3 1.8.6 2.6a2 2 0 0 1-.5 2.1L8 9.6a16 16 0 0 0 6 6l1.2-1.2a2 2 0 0 1 2.1-.5c.8.3 1.7.5 2.6.6A2 2 0 0 1 22 16.9Z"/></svg>
    );
    case "pickup": return (
      <svg {...p}><path d="M3 7h13l1 4h4v6h-2"/><circle cx="7" cy="18" r="2"/><circle cx="17" cy="18" r="2"/><path d="M3 7v10h2"/></svg>
    );
    case "store": return (
      <svg {...p}><path d="M3 9 5 4h14l2 5"/><path d="M3 9h18v3a3 3 0 0 1-6 0 3 3 0 0 1-6 0 3 3 0 0 1-6 0V9Z"/><path d="M5 13v8h14v-8"/></svg>
    );
    default: return <svg {...p}/>;
  }
};

window.Ic = Ic;
