// JAVIS — icons (BlurMe + Material Design filled style)

const JIcon = ({ name, size = 18, color = "currentColor", strokeWidth = 2, ...rest }) => {
  const sv = { width: size, height: size, viewBox: "0 0 24 24", fill: "none", ...rest };

  switch (name) {
    case "calendar":
      return (
        <svg {...sv}>
          <path fill={color} d="M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11zM7 11h5v5H7z"/>
        </svg>
      );
    case "clock":
      return (
        <svg {...sv}>
          <path fill={color} d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67V7z"/>
        </svg>
      );
    case "map-pin":
      return (
        <svg {...sv}>
          <path fill={color} d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/>
        </svg>
      );
    case "bell":
      return (
        <svg {...sv}>
          <path fill={color} d="M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"/>
        </svg>
      );
    case "users":
      return (
        <svg {...sv}>
          <path fill={color} d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/>
        </svg>
      );
    case "send":
      return (
        <svg {...sv}>
          <path fill={color} d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/>
        </svg>
      );
    case "sparkles":
      return (
        <svg {...sv}>
          <path fill={color} d="M19 9l1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25L19 9zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12l-5.5-2.5zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25L19 15z"/>
        </svg>
      );
    case "x":
      return (
        <svg {...sv} stroke={color} strokeWidth={strokeWidth} strokeLinecap="round">
          <path d="M6 6L18 18M18 6L6 18"/>
        </svg>
      );
    case "plus":
      return (
        <svg {...sv} stroke={color} strokeWidth={strokeWidth} strokeLinecap="round">
          <path d="M12 5V19M5 12H19"/>
        </svg>
      );
    case "trash":
      return (
        <svg {...sv}>
          <path fill={color} d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"/>
        </svg>
      );
    case "edit":
      return (
        <svg {...sv}>
          <path fill={color} d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/>
        </svg>
      );
    case "chevron-left":
      return (
        <svg {...sv} stroke={color} strokeWidth={strokeWidth} strokeLinecap="round" strokeLinejoin="round">
          <path d="M15 19L8 12L15 5"/>
        </svg>
      );
    case "chevron-right":
      return (
        <svg {...sv} stroke={color} strokeWidth={strokeWidth} strokeLinecap="round" strokeLinejoin="round">
          <path d="M9 5L16 12L9 19"/>
        </svg>
      );
    case "check":
      return (
        <svg {...sv}>
          <path fill={color} d="M8.795 15.875L4.625 11.705L3.205 13.115L8.795 18.705L20.795 6.705L19.385 5.295L8.795 15.875Z"/>
        </svg>
      );
    case "info":
      return (
        <svg {...sv}>
          <path fill={color} d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/>
        </svg>
      );
    case "search":
      return (
        <svg {...sv}>
          <path fill={color} d="M15.864 14.321h-.813l-.288-.278A6.69 6.69 0 0 0 16.379 9.69a6.69 6.69 0 0 0-6.69-6.69 6.69 6.69 0 0 0-6.689 6.69 6.69 6.69 0 0 0 6.69 6.689 6.69 6.69 0 0 0 4.352-1.616l.278.288v.813L19.466 21 21 19.467l-5.136-5.146zm-6.174 0a4.632 4.632 0 0 1-4.632-4.632 4.632 4.632 0 0 1 4.632-4.632 4.632 4.632 0 0 1 4.632 4.632 4.632 4.632 0 0 1-4.632 4.632z"/>
        </svg>
      );
    case "settings":
      return (
        <svg {...sv}>
          <path fill={color} d="M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"/>
        </svg>
      );
    case "message":
      return (
        <svg {...sv}>
          <path fill={color} d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"/>
        </svg>
      );
    case "dot":
      return (
        <svg {...sv}>
          <circle cx="12" cy="12" r="4" fill={color}/>
        </svg>
      );
    case "command":
      return (
        <svg {...sv} stroke={color} strokeWidth={strokeWidth} strokeLinecap="round" strokeLinejoin="round">
          <path d="M18 6a3 3 0 1 0-3 3h6m-6 6a3 3 0 1 0 3 3v-6m-6 0a3 3 0 1 0-3-3h6m6 0a3 3 0 1 0 3 3v-6"/>
        </svg>
      );
    case "check-circle":
      return (
        <svg {...sv}>
          <path fill={color} d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5l-4-4 1.41-1.41L10 13.67l6.59-6.59L18 8.5l-8 8z"/>
        </svg>
      );
    case "arrow-up":
      return (
        <svg {...sv}>
          <path fill={color} d="M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"/>
        </svg>
      );
    default:
      return (
        <svg {...sv}>
          <circle cx="12" cy="12" r="9" fill={color} fillOpacity="0.3"/>
        </svg>
      );
  }
};

window.JIcon = JIcon;
