// Tiny consistent icon set (stroke-based)
const Icon = ({ name, size = 18, className = "", ...rest }) => {
  const s = size;
  const P = { width: s, height: s, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1.7, strokeLinecap: "round", strokeLinejoin: "round", className, ...rest };
  switch (name) {
    case "dashboard":
      return (<svg {...P}><rect x="3" y="3" width="7" height="9" rx="1.5"/><rect x="14" y="3" width="7" height="5" rx="1.5"/><rect x="14" y="12" width="7" height="9" rx="1.5"/><rect x="3" y="16" width="7" height="5" rx="1.5"/></svg>);
    case "list":
      return (<svg {...P}><path d="M8 6h13M8 12h13M8 18h13"/><circle cx="4" cy="6" r="1.2"/><circle cx="4" cy="12" r="1.2"/><circle cx="4" cy="18" r="1.2"/></svg>);
    case "plus":
      return (<svg {...P}><path d="M12 5v14M5 12h14"/></svg>);
    case "check":
      return (<svg {...P}><path d="M4 12l5 5L20 6"/></svg>);
    case "approve":
      return (<svg {...P}><path d="M9 12l2 2 4-4"/><path d="M21 12c0 4.97-4.03 9-9 9s-9-4.03-9-9 4.03-9 9-9c2.5 0 4.76 1.02 6.4 2.66"/></svg>);
    case "cert":
      return (<svg {...P}><rect x="3" y="3" width="18" height="14" rx="2"/><circle cx="12" cy="10" r="2.5"/><path d="M9.5 14.5l-1 5.5 3.5-2 3.5 2-1-5.5"/></svg>);
    case "database":
      return (<svg {...P}><ellipse cx="12" cy="5" rx="8" ry="3"/><path d="M4 5v6c0 1.66 3.58 3 8 3s8-1.34 8-3V5"/><path d="M4 11v6c0 1.66 3.58 3 8 3s8-1.34 8-3v-6"/></svg>);
    case "users":
      return (<svg {...P}><circle cx="9" cy="8" r="3.2"/><path d="M3 20c0-3.3 2.7-6 6-6s6 2.7 6 6"/><circle cx="17" cy="9" r="2.5"/><path d="M21 19c0-2.5-2-4.5-4.5-4.5"/></svg>);
    case "settings":
      return (<svg {...P}><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.6 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.6a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9c.13.32.2.66.2 1H22a2 2 0 1 1 0 4h-.4c-.34 0-.68.07-1 .2z"/></svg>);
    case "search":
      return (<svg {...P}><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></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 21h4"/></svg>);
    case "upload":
      return (<svg {...P}><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><path d="M17 8l-5-5-5 5"/><path d="M12 3v12"/></svg>);
    case "download":
      return (<svg {...P}><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><path d="M7 10l5 5 5-5"/><path d="M12 15V3"/></svg>);
    case "file":
      return (<svg {...P}><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><path d="M14 2v6h6"/></svg>);
    case "chevron-right":
      return (<svg {...P}><path d="M9 18l6-6-6-6"/></svg>);
    case "chevron-left":
      return (<svg {...P}><path d="M15 18l-6-6 6-6"/></svg>);
    case "x":
      return (<svg {...P}><path d="M18 6L6 18M6 6l12 12"/></svg>);
    case "more":
      return (<svg {...P}><circle cx="5" cy="12" r="1.5"/><circle cx="12" cy="12" r="1.5"/><circle cx="19" cy="12" r="1.5"/></svg>);
    case "edit":
      return (<svg {...P}><path d="M12 20h9"/><path d="M16.5 3.5a2.121 2.121 0 1 1 3 3L7 19l-4 1 1-4 12.5-12.5z"/></svg>);
    case "trash":
      return (<svg {...P}><path d="M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"/></svg>);
    case "shield":
      return (<svg {...P}><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg>);
    case "filter":
      return (<svg {...P}><path d="M3 4h18l-7 9v6l-4 2v-8z"/></svg>);
    case "clock":
      return (<svg {...P}><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></svg>);
    case "send":
      return (<svg {...P}><path d="M22 2 11 13"/><path d="M22 2l-7 20-4-9-9-4z"/></svg>);
    case "tag":
      return (<svg {...P}><path d="M20.6 11.4l-9-9A2 2 0 0 0 10.2 2H4a2 2 0 0 0-2 2v6.2c0 .5.2 1 .6 1.4l9 9a2 2 0 0 0 2.8 0l6.2-6.2a2 2 0 0 0 0-2.8z"/><circle cx="7" cy="7" r="1.2"/></svg>);
    case "calendar":
      return (<svg {...P}><rect x="3" y="4" width="18" height="18" rx="2"/><path d="M16 2v4M8 2v4M3 10h18"/></svg>);
    case "external":
      return (<svg {...P}><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><path d="M15 3h6v6"/><path d="M10 14L21 3"/></svg>);
    default: return null;
  }
};

window.Icon = Icon;
