// MedBridge — icon set (geometric, 1.5px stroke, rounded).
// Inspired by Phosphor/Lucide. All take size + color props.

const Icon = ({ name, size = 20, color = 'currentColor', stroke = 1.5 }) => {
  const p = { width: size, height: size, viewBox: '0 0 24 24', fill: 'none',
    stroke: color, strokeWidth: stroke, strokeLinecap: 'round', strokeLinejoin: 'round' };
  switch (name) {
    case 'home':    return <svg {...p}><path d="M3 11l9-7 9 7v9a2 2 0 0 1-2 2h-4v-7h-6v7H5a2 2 0 0 1-2-2z"/></svg>;
    case 'briefcase': return <svg {...p}><rect x="3" y="7" width="18" height="13" rx="2"/><path d="M9 7V5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2M3 13h18"/></svg>;
    case 'search':  return <svg {...p}><circle cx="11" cy="11" r="7"/><path d="M21 21l-4.3-4.3"/></svg>;
    case 'news':    return <svg {...p}><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M7 9h10M7 13h10M7 17h6"/></svg>;
    case 'user':    return <svg {...p}><circle cx="12" cy="8" r="4"/><path d="M4 21c0-4.4 3.6-8 8-8s8 3.6 8 8"/></svg>;
    case 'plus':    return <svg {...p}><path d="M12 5v14M5 12h14"/></svg>;
    case 'check':   return <svg {...p}><path d="M5 12l5 5 9-11"/></svg>;
    case 'check-circle': return <svg {...p}><circle cx="12" cy="12" r="9"/><path d="M8 12.5l3 3 5-6"/></svg>;
    case 'badge-check': return <svg {...p}><path d="M12 2l2.4 2H17v2.6L19 9l-1.4 2.4L19 14l-2 1.4V18h-2.6L12 20l-2.4-2H7v-2.6L5 13l1.4-2.4L5 8l2-1.4V4h2.6z"/><path d="M9 12l2 2 4-5"/></svg>;
    case 'shield':  return <svg {...p}><path d="M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6z"/><path d="M9 12l2 2 4-5"/></svg>;
    case 'calendar':return <svg {...p}><rect x="3" y="5" width="18" height="16" rx="2"/><path d="M3 9h18M8 3v4M16 3v4"/></svg>;
    case 'clock':   return <svg {...p}><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></svg>;
    case 'pin':     return <svg {...p}><path d="M12 21s7-6 7-12a7 7 0 0 0-14 0c0 6 7 12 7 12z"/><circle cx="12" cy="9" r="2.5"/></svg>;
    case 'euro':    return <svg {...p}><path d="M17 5a6 6 0 0 0-9 4M17 19a6 6 0 0 1-9-4M4 11h10M4 14h10"/></svg>;
    case 'bookmark':return <svg {...p}><path d="M6 4h12v17l-6-4-6 4z"/></svg>;
    case 'bookmark-filled': return <svg {...p} fill={color}><path d="M6 4h12v17l-6-4-6 4z"/></svg>;
    case 'chevron-r':return <svg {...p}><path d="M9 5l7 7-7 7"/></svg>;
    case 'chevron-l':return <svg {...p}><path d="M15 5l-7 7 7 7"/></svg>;
    case 'chevron-d':return <svg {...p}><path d="M5 9l7 7 7-7"/></svg>;
    case 'sliders': return <svg {...p}><path d="M4 6h10M18 6h2M4 12h2M10 12h10M4 18h12M20 18h0"/><circle cx="16" cy="6" r="2"/><circle cx="8" cy="12" r="2"/><circle cx="18" cy="18" r="2"/></svg>;
    case 'filter':  return <svg {...p}><path d="M3 5h18l-7 9v6l-4-2v-4z"/></svg>;
    case 'message': return <svg {...p}><path d="M4 5h16v12H8l-4 4z"/></svg>;
    case 'send':    return <svg {...p}><path d="M21 3L3 11l7 2 2 7z"/></svg>;
    case 'stethoscope': return <svg {...p}><path d="M6 3v6a4 4 0 0 0 8 0V3M10 13v3a4 4 0 0 0 8 0v-2"/><circle cx="18" cy="12" r="1.5"/></svg>;
    case 'graduation': return <svg {...p}><path d="M2 9l10-4 10 4-10 4z"/><path d="M6 11v5c0 1 3 3 6 3s6-2 6-3v-5"/></svg>;
    case 'sparkle': return <svg {...p}><path d="M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8z"/></svg>;
    case 'bell':    return <svg {...p}><path d="M6 16V11a6 6 0 1 1 12 0v5l2 2H4z"/><path d="M10 21h4"/></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 4.3 17l.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"/></svg>;
    case 'car':     return <svg {...p}><path d="M3 13l2-6h14l2 6v5h-3v-2H6v2H3z"/><circle cx="7" cy="16" r="1.5"/><circle cx="17" cy="16" r="1.5"/></svg>;
    case 'train':   return <svg {...p}><rect x="5" y="3" width="14" height="14" rx="3"/><path d="M5 11h14M8 21l2-3M14 18l2 3"/><circle cx="9" cy="14" r="0.8"/><circle cx="15" cy="14" r="0.8"/></svg>;
    case 'wheelchair': return <svg {...p}><circle cx="9" cy="5" r="2"/><path d="M9 7v6h5l3 5M5 13a6 6 0 1 0 7 9"/></svg>;
    case 'bed':     return <svg {...p}><path d="M3 18v-7h18v7M3 13V7M21 13V9a2 2 0 0 0-2-2H11"/><circle cx="7" cy="11" r="1.5"/></svg>;
    case 'language':return <svg {...p}><path d="M3 5h12M9 3v2M5 5c0 5 4 8 8 9M14 14c-2-1-4-3-5-5M14 21l4-10 4 10M15 18h6"/></svg>;
    case 'monitor': return <svg {...p}><rect x="3" y="4" width="18" height="12" rx="2"/><path d="M8 20h8M12 16v4"/></svg>;
    case 'users':   return <svg {...p}><circle cx="9" cy="8" r="3.5"/><path d="M2 20c0-3.5 3-6 7-6s7 2.5 7 6"/><circle cx="17" cy="7" r="2.5"/><path d="M16 14c3 0 6 2 6 5"/></svg>;
    case 'alert':   return <svg {...p}><path d="M12 3l10 17H2z"/><path d="M12 10v4M12 17v0"/></svg>;
    case 'info':    return <svg {...p}><circle cx="12" cy="12" r="9"/><path d="M12 11v5M12 8v0"/></svg>;
    case 'x':       return <svg {...p}><path d="M6 6l12 12M18 6L6 18"/></svg>;
    case 'eye':     return <svg {...p}><path d="M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12z"/><circle cx="12" cy="12" r="3"/></svg>;
    case 'eye-off': return <svg {...p}><path d="M3 3l18 18M10 6c1-.4 1.7-.5 2-.5 6 0 10 6.5 10 6.5a16 16 0 0 1-3 3.5M6.5 7.5C3.5 9.5 2 12 2 12s4 6.5 10 6.5c1.7 0 3.2-.4 4.5-1M9.5 10A3 3 0 0 0 14 14.5"/></svg>;
    case 'file':    return <svg {...p}><path d="M6 3h8l5 5v13H6z"/><path d="M14 3v5h5M9 13h7M9 17h5"/></svg>;
    case 'document':return <svg {...p}><path d="M6 3h12v18H6z"/><path d="M9 8h6M9 12h6M9 16h4"/></svg>;
    case 'star':    return <svg {...p}><path d="M12 3l2.8 6 6.2.9-4.5 4.4 1 6.2L12 17.7 6.5 20.5l1-6.2L3 9.9 9.2 9z"/></svg>;
    case 'star-filled': return <svg {...p} fill={color}><path d="M12 3l2.8 6 6.2.9-4.5 4.4 1 6.2L12 17.7 6.5 20.5l1-6.2L3 9.9 9.2 9z"/></svg>;
    case 'parking': return <svg {...p}><rect x="4" y="4" width="16" height="16" rx="3"/><path d="M10 17V8h3.5a2.5 2.5 0 0 1 0 5H10"/></svg>;
    case 'edit':    return <svg {...p}><path d="M4 20l4-1L19 8l-3-3L5 16zM14 6l3 3"/></svg>;
    case 'syringe': return <svg {...p}><path d="M14 4l6 6M16 6l-9 9-3 3 4 1 1 3 11-11M9 14l3 3"/></svg>;
    case 'phone':   return <svg {...p}><path d="M5 4h4l2 5-3 2a12 12 0 0 0 5 5l2-3 5 2v4a2 2 0 0 1-2 2A15 15 0 0 1 3 6a2 2 0 0 1 2-2z"/></svg>;
    case 'phone-down': return <svg {...p}><path d="M2 14a13 13 0 0 1 20 0l-2 3-4-2v-2a8 8 0 0 0-8 0v2l-4 2z"/></svg>;
    case 'mic-off': return <svg {...p}><path d="M9 9V6a3 3 0 0 1 6 0v6M19 11a7 7 0 0 1-1.5 4.3M5 11a7 7 0 0 0 12 5M12 19v3M3 3l18 18"/></svg>;
    case 'keypad':  return <svg {...p}><circle cx="6" cy="6" r="1.5"/><circle cx="12" cy="6" r="1.5"/><circle cx="18" cy="6" r="1.5"/><circle cx="6" cy="12" r="1.5"/><circle cx="12" cy="12" r="1.5"/><circle cx="18" cy="12" r="1.5"/><circle cx="6" cy="18" r="1.5"/><circle cx="12" cy="18" r="1.5"/><circle cx="18" cy="18" r="1.5"/></svg>;
    case 'speaker': return <svg {...p}><path d="M5 9h3l5-4v14l-5-4H5z"/><path d="M16 9a3 3 0 0 1 0 6M18.5 6.5a7 7 0 0 1 0 11"/></svg>;
    case 'building':return <svg {...p}><rect x="5" y="3" width="14" height="18" rx="1"/><path d="M9 7h2M13 7h2M9 11h2M13 11h2M9 15h2M13 15h2M10 21v-3h4v3"/></svg>;
    case 'star':    return <svg {...p} fill={color}><path d="M12 3l2.6 5.6L20 9.4l-4 4 1 5.6L12 16.6 7 19l1-5.6-4-4 5.4-.8z"/></svg>;
    case 'star-o':  return <svg {...p}><path d="M12 3l2.6 5.6L20 9.4l-4 4 1 5.6L12 16.6 7 19l1-5.6-4-4 5.4-.8z"/></svg>;
    case 'thumb-up':return <svg {...p}><path d="M7 11v9H3v-9zM7 11l4-7a2 2 0 0 1 2 2v4h6a2 2 0 0 1 2 2l-2 7a2 2 0 0 1-2 2H7"/></svg>;
    case 'x':       return <svg {...p}><path d="M6 6l12 12M18 6L6 18"/></svg>;
    case 'sort':    return <svg {...p}><path d="M7 4v16M3 8l4-4 4 4M17 20V4M13 16l4 4 4-4"/></svg>;
    case 'archive': return <svg {...p}><rect x="3" y="4" width="18" height="4" rx="1"/><path d="M5 8v11h14V8M10 13h4"/></svg>;
    default:        return null;
  }
};

Object.assign(window, { Icon });
