// icons.jsx — minimal stroked icon set (currentColor, 1.5px stroke)
const I = ({ d, size = 18, fill, ...rest }) => (
  <svg width={size} height={size} viewBox="0 0 24 24" fill={fill || "none"} stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" {...rest}>
    {d}
  </svg>
);

const Icon = {
  Dashboard: (p) => <I {...p} d={<><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"/></>} />,
  Calendar: (p) => <I {...p} d={<><rect x="3" y="5" width="18" height="16" rx="2"/><path d="M3 9h18M8 3v4M16 3v4"/></>} />,
  Patients: (p) => <I {...p} d={<><circle cx="9" cy="8" r="3.5"/><path d="M3 20c0-3.3 2.7-6 6-6s6 2.7 6 6"/><circle cx="17" cy="6" r="2.5"/><path d="M14.5 13c2.6.4 4.5 2.6 4.5 5.3"/></>} />,
  Clipboard: (p) => <I {...p} d={<><rect x="6" y="4" width="12" height="17" rx="2"/><rect x="9" y="2" width="6" height="4" rx="1"/><path d="M9.5 11h5M9.5 14.5h5M9.5 18h3"/></>} />,
  Inbox: (p) => <I {...p} d={<><path d="M3 12l3-7h12l3 7"/><path d="M3 12v6a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-6"/><path d="M3 12h5l1 2h6l1-2h5"/></>} />,
  MessageCircle: (p) => <I {...p} d={<><path d="M21 11.5a8.5 8.5 0 0 1-12.4 7.6L3 21l1.9-5.3A8.5 8.5 0 1 1 21 11.5z"/></>} />,
  Upload: (p) => <I {...p} d={<><path d="M12 16V4"/><path d="m7 9 5-5 5 5"/><path d="M4 16v3a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-3"/></>} />,
  Billing: (p) => <I {...p} d={<><rect x="3" y="6" width="18" height="13" rx="2"/><path d="M3 10h18M7 15h3"/></>} />,
  Settings: (p) => <I {...p} d={<><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.3H9a1.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.8V9a1.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"/></>} />,
  Search: (p) => <I {...p} d={<><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></>} />,
  Plus: (p) => <I {...p} d={<><path d="M12 5v14M5 12h14"/></>} />,
  Check: (p) => <I {...p} d={<path d="m4 12 5 5L20 6"/>} />,
  ChevronDown: (p) => <I {...p} d={<path d="m6 9 6 6 6-6"/>} />,
  ChevronRight: (p) => <I {...p} d={<path d="m9 6 6 6-6 6"/>} />,
  ChevronLeft: (p) => <I {...p} d={<path d="m15 6-6 6 6 6"/>} />,
  ArrowRight: (p) => <I {...p} d={<><path d="M5 12h14"/><path d="m13 6 6 6-6 6"/></>} />,
  ArrowUp: (p) => <I {...p} d={<><path d="M12 19V5"/><path d="m6 11 6-6 6 6"/></>} />,
  X: (p) => <I {...p} d={<><path d="M6 6l12 12M18 6 6 18"/></>} />,
  Bell: (p) => <I {...p} d={<><path d="M6 8a6 6 0 0 1 12 0c0 6 3 7 3 7H3s3-1 3-7"/><path d="M10.3 21a1.94 1.94 0 0 0 3.4 0"/></>} />,
  Phone: (p) => <I {...p} d={<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"/>} />,
  Video: (p) => <I {...p} d={<><rect x="2" y="6" width="14" height="12" rx="2"/><path d="m22 8-6 4 6 4V8z"/></>} />,
  Mic: (p) => <I {...p} d={<><rect x="9" y="3" width="6" height="11" rx="3"/><path d="M5 11a7 7 0 0 0 14 0M12 18v3M9 21h6"/></>} />,
  Pause: (p) => <I {...p} d={<><path d="M8 5v14"/><path d="M16 5v14"/></>} />,
  Play: (p) => <I {...p} d={<path d="M8 5v14l11-7z"/>} />,
  Sparkle: (p) => <I {...p} d={<path d="M12 3v4M12 17v4M3 12h4M17 12h4M5.6 5.6l2.8 2.8M15.6 15.6l2.8 2.8M5.6 18.4l2.8-2.8M15.6 8.4l2.8-2.8"/>} />,
  Filter: (p) => <I {...p} d={<path d="M3 5h18M6 12h12M10 19h4"/>} />,
  Menu: (p) => <I {...p} d={<path d="M4 6h16M4 12h16M4 18h16"/>} />,
  Star: (p) => <I {...p} d={<path d="m12 3 2.7 5.47 6.04.88-4.37 4.26 1.03 6.02L12 16.79l-5.4 2.84 1.03-6.02-4.37-4.26 6.04-.88L12 3z"/>} />,
  More: (p) => <I {...p} d={<><circle cx="5" cy="12" r="1.2" fill="currentColor"/><circle cx="12" cy="12" r="1.2" fill="currentColor"/><circle cx="19" cy="12" r="1.2" fill="currentColor"/></>} />,
  Heart: (p) => <I {...p} d={<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/>} />,
  Pulse: (p) => <I {...p} d={<path d="M3 12h4l2-7 4 14 2-7h6"/>} />,
  Pill: (p) => <I {...p} d={<><rect x="2.5" y="9" width="19" height="6" rx="3" transform="rotate(-45 12 12)"/><path d="M8.5 8.5l7 7"/></>} />,
  Lab: (p) => <I {...p} d={<><path d="M9 3v6L4 19a2 2 0 0 0 1.7 3h12.6A2 2 0 0 0 20 19l-5-10V3"/><path d="M8 3h8M7 14h10"/></>} />,
  User: (p) => <I {...p} d={<><circle cx="12" cy="8" r="4"/><path d="M4 21c0-4.4 3.6-8 8-8s8 3.6 8 8"/></>} />,
  Sun: (p) => <I {...p} d={<><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"/></>} />,
  Moon: (p) => <I {...p} d={<path d="M21 14.5A8.5 8.5 0 0 1 9.5 3 7 7 0 1 0 21 14.5z"/>} />,
  Globe: (p) => <I {...p} d={<><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"/></>} />,
  Mail: (p) => <I {...p} d={<><rect x="3" y="5" width="18" height="14" rx="2"/><path d="m3 7 9 6 9-6"/></>} />,
  Clock: (p) => <I {...p} d={<><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></>} />,
  Pin: (p) => <I {...p} d={<><path d="M12 22s7-6.5 7-12a7 7 0 1 0-14 0c0 5.5 7 12 7 12z"/><circle cx="12" cy="10" r="2.5"/></>} />,
  Edit: (p) => <I {...p} d={<><path d="M12 20h9"/><path d="M16.5 3.5a2.12 2.12 0 1 1 3 3L7 19l-4 1 1-4Z"/></>} />,
  Trash: (p) => <I {...p} d={<><path d="M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M6 6l1 14a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-14"/></>} />,
  Send: (p) => <I {...p} d={<><path d="m22 2-7 20-4-9-9-4 20-7z"/><path d="M22 2 11 13"/></>} />,
  Logo: ({ size = 18, className = "", alt = "", ...rest } = {}) => (
    <img
      src="/static/logo.png?v=27"
      alt={alt}
      className={"ms-brand-logo" + (className ? " " + className : "")}
      width={size}
      height={size}
      draggable="false"
      {...rest}
    />
  ),
  CalendarPlus: (p) => <I {...p} d={<><rect x="3" y="5" width="18" height="16" rx="2"/><path d="M3 9h18M8 3v4M16 3v4M12 13v6M9 16h6"/></>} />,
  Document: (p) => <I {...p} d={<><path d="M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"/><path d="M14 3v5h5M9 13h6M9 17h4"/></>} />,
  Copy: (p) => <I {...p} d={<><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"/></>} />,
  Eye: (p) => <I {...p} d={<><path d="M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6S2 12 2 12z"/><circle cx="12" cy="12" r="3"/></>} />,
  Print: (p) => <I {...p} d={<><path d="M7 9V3h10v6"/><rect x="6" y="14" width="12" height="7" rx="1"/><rect x="4" y="9" width="16" height="7" rx="2"/><path d="M8 17h8"/></>} />,
  Refresh: (p) => <I {...p} d={<><path d="M3 12a9 9 0 0 1 15-6.7L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-15 6.7L3 16"/><path d="M3 21v-5h5"/></>} />,
};

window.Icon = Icon;
