/* global React */
// Lucide outline icons inlined. Stroke 1.75. Names kebab-case.

const PATHS = {
  "menu":            <path d="M3 6h18M3 12h18M3 18h18"/>,
  "x":               <><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></>,
  "chevron-down":    <polyline points="6 9 12 15 18 9"/>,
  "chevron-up":      <polyline points="18 15 12 9 6 15"/>,
  "chevron-right":   <polyline points="9 6 15 12 9 18"/>,
  "chevron-left":    <polyline points="15 6 9 12 15 18"/>,
  "arrow-right":     <><line x1="5" y1="12" x2="19" y2="12"/><polyline points="12 5 19 12 12 19"/></>,
  "arrow-up-right":  <><line x1="7" y1="17" x2="17" y2="7"/><polyline points="7 7 17 7 17 17"/></>,
  "arrow-down":      <><line x1="12" y1="5" x2="12" y2="19"/><polyline points="19 12 12 19 5 12"/></>,
  "phone":           <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.72c.127.96.361 1.903.7 2.81a2 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-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z"/>,
  "mail":            <><rect x="2" y="4" width="20" height="16" rx="2"/><polyline points="22,6 12,13 2,6"/></>,
  "map-pin":         <><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"/><circle cx="12" cy="10" r="3"/></>,
  "map":             <><polygon points="1 6 1 22 8 18 16 22 23 18 23 2 16 6 8 2 1 6"/><line x1="8" y1="2" x2="8" y2="18"/><line x1="16" y1="6" x2="16" y2="22"/></>,
  "navigation":      <polygon points="3 11 22 2 13 21 11 13 3 11"/>,
  "clock":           <><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></>,
  "calendar":        <><rect x="3" y="4" width="18" height="18" rx="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></>,
  "check":           <polyline points="20 6 9 17 4 12"/>,
  "check-circle":    <><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></>,
  "info":            <><circle cx="12" cy="12" r="10"/><line x1="12" y1="8.5" x2="12" y2="12"/><line x1="12" y1="15.5" x2="12.01" y2="15.5"/></>,
  "alert-triangle":  <><path d="M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></>,
  "store":           <><path d="M3 9h18v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9z"/><path d="M3 9V6a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v3"/><path d="M9 22V12h6v10"/></>,
  "shopping-basket": <><circle cx="8" cy="21" r="1"/><circle cx="19" cy="21" r="1"/><path d="M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12"/></>,
  "tent":            <><path d="M3.5 21 12 6l8.5 15"/><path d="M3.5 21h17"/><path d="M12 6v15"/></>,
  "waves":           <><path d="M2 22c1.25-.987 2.27-1.975 3.9-2.2a5.56 5.56 0 0 1 3.8 1.5 4 4 0 0 0 5.7 0 5.56 5.56 0 0 1 3.8-1.5c1.63.225 2.65 1.213 3.9 2.2"/><path d="M2 16.1c1.25-.987 2.27-1.975 3.9-2.2a5.56 5.56 0 0 1 3.8 1.5 4 4 0 0 0 5.7 0 5.56 5.56 0 0 1 3.8-1.5c1.63.225 2.65 1.213 3.9 2.2"/><path d="M2 10.3c1.25-.987 2.27-1.975 3.9-2.2a5.56 5.56 0 0 1 3.8 1.5 4 4 0 0 0 5.7 0 5.56 5.56 0 0 1 3.8-1.5c1.63.225 2.65 1.213 3.9 2.2"/></>,
  "sprout":          <><path d="M7 20h10"/><path d="M10 20c5.5-2.5.8-6.4 3-10"/><path d="M9.5 9.4c1.1.8 1.8 2.2 2.3 3.7-2 .4-3.5.4-4.8-.3-1.2-.6-2.3-1.9-3-4.2 2.8-.5 4.4 0 5.5.8z"/><path d="M14.1 6a7 7 0 0 0-1.1 4c1.9-.1 3.3-.6 4.3-1.4 1-1 1.6-2.3 1.7-4.6-2.7.1-4 1-4.9 2z"/></>,
  "droplets":        <><path d="M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z"/><path d="M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97"/></>,
  "leaf":            <><path d="M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19.2 2.96c1.4 2.65 1.4 5.7 1.4 8.04 0 5.04-3.4 9-9 9z"/><path d="M2 21c0-3 1.85-5.36 5.08-6"/></>,
  "help-circle":     <><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></>,
  "facebook":        <path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"/>,
  "instagram":       <><rect x="2" y="2" width="20" height="20" rx="5"/><path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"/><line x1="17.5" y1="6.5" x2="17.51" y2="6.5"/></>,
  "external-link":   <><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/></>,
  "user":            <><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></>,
  "building":        <><rect x="4" y="2" width="16" height="20" rx="2"/><path d="M9 22v-4h6v4"/><path d="M8 6h.01M16 6h.01M12 6h.01M8 10h.01M16 10h.01M12 10h.01M8 14h.01M16 14h.01M12 14h.01"/></>,
  "award":           <><circle cx="12" cy="8" r="6"/><polyline points="8.21 13.89 7 23 12 20 17 23 15.79 13.88"/></>,
  "truck":           <><rect x="1" y="3" width="15" height="13"/><polygon points="16 8 20 8 23 11 23 16 16 16 16 8"/><circle cx="5.5" cy="18.5" r="2.5"/><circle cx="18.5" cy="18.5" r="2.5"/></>,
  "handshake":       <><path d="m11 17 2 2a1 1 0 1 0 3-3"/><path d="m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4"/><path d="m21 3 1 11h-2"/><path d="M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3"/><path d="M3 4h8"/></>,
  "video":           <><polygon points="23 7 16 12 23 17 23 7"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/></>,
  "newspaper":       <><path d="M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2"/><path d="M18 14h-8"/><path d="M15 18h-5"/><path d="M10 6h8v4h-8V6Z"/></>,
  "image":           <><rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/></>,
  "anchor":          <><circle cx="12" cy="5" r="3"/><line x1="12" y1="22" x2="12" y2="8"/><path d="M5 12H2a10 10 0 0 0 20 0h-3"/></>,
  "shrimp":          <><path d="M20 6c-2 0-4 1-5 3"/><path d="M22 9c-2-1-4 0-5 2"/><path d="M17 11a5 5 0 1 0-5 5"/><path d="M13 19l-3-1 1-2"/><circle cx="15.5" cy="10" r=".8" fill="currentColor"/></>,
  "crab":            <><ellipse cx="12" cy="13" rx="6" ry="3.5"/><path d="M6 11 3 8M4 10l-1.5-1M18 11l3-3M20 10l1.5-1"/><path d="M7 16l-1.5 3M10 16.5l-.5 3.2M14 16.5l.5 3.2M17 16l1.5 3"/><circle cx="10" cy="12" r=".7" fill="currentColor"/><circle cx="14" cy="12" r=".7" fill="currentColor"/></>,
  "lobster":         <><path d="M5 6l-2-3M7 5L5 2M19 6l2-3M17 5l2-3"/><path d="M6 8c2-1 4 0 5 2"/><path d="M18 8c-2-1-4 0-5 2"/><path d="M9 11a3 3 0 0 1 6 0"/><path d="M9 11c-1 1-1 3 0 4M15 11c1 1 1 3 0 4"/><path d="M10 16c0 2 1 4 2 5 1-1 2-3 2-5"/><circle cx="11" cy="9.5" r=".6" fill="currentColor"/><circle cx="13" cy="9.5" r=".6" fill="currentColor"/></>,
  "oyster":          <><path d="M3 12c0-4 4-8 9-8s9 4 9 8c0 1-.4 2-1 2.7L12 21l-8-6.3C3.4 14 3 13 3 12Z"/><path d="M5 12c.5-2 3-4 7-4s6.5 2 7 4"/><ellipse cx="12" cy="12" rx="3" ry="2" fill="currentColor" opacity=".4"/></>,
  "fish":            <><path d="M6.5 12c.94-3.46 4.94-6 8.5-6 3.56 0 6.06 2.54 7 6-.94 3.47-3.44 6-7 6s-7.56-2.54-8.5-6Z"/><path d="M18 12v.5"/><path d="M16 17.93a9.77 9.77 0 0 1 0-11.86"/><path d="M7 10.67C7 8 5.58 5.97 2.73 5.5c-1 1.5-1 5 .23 6.5-1.24 1.5-1.24 5-.23 6.5C5.58 18.03 7 16 7 13.33"/><path d="M10.46 7.26C10.2 5.88 9.17 4.24 8 3h5.8a2 2 0 0 1 1.98 1.67l.23 1.4"/><path d="m16.01 17.93-.23 1.4A2 2 0 0 1 13.8 21H9.5a5.96 5.96 0 0 0 1.49-3.98"/></>,
  "scallop":         <><path d="M12 2c5 0 9 4 9 9 0 3-1 6-3 8-1.5-2-3-3-6-3s-4.5 1-6 3c-2-2-3-5-3-8 0-5 4-9 9-9Z"/><path d="M12 2v18"/><path d="m5 6 5 8M19 6l-5 8M3 12l6 5M21 12l-6 5"/></>,
  "lock":            <><rect x="3" y="11" width="18" height="11" rx="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></>,
  "search":          <><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></>,
  "send":            <><line x1="22" y1="2" x2="11" y2="13"/><polygon points="22 2 15 22 11 13 2 9 22 2"/></>,
  "cookie":          <><path d="M12 2a10 10 0 1 0 10 10c0-.46-.04-.92-.1-1.36a5.39 5.39 0 0 1-4.4-5.36 5.39 5.39 0 0 1-5.62-4.27c-.42-.07-.85-.11-1.28-.11Z"/><path d="M8.5 8.5v.01M16 15.5v.01M12 12v.01M11 17v.01M7 14v.01"/></>,
  "shield-check":    <><path d="M20 13c0 5-3.5 7.5-8 8.5-4.5-1-8-3.5-8-8.5V5l8-3 8 3v8z"/><path d="m9 12 2 2 4-4"/></>,
  "utensils":        <><path d="M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2"/><path d="M7 2v20"/><path d="M21 15V2a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7"/></>,
  "arrow-left":      <><line x1="19" y1="12" x2="5" y2="12"/><polyline points="12 19 5 12 12 5"/></>,
  "book-open":       <><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/></>,
  "chef-hat":        <><path d="M6 13.87A4 4 0 0 1 7.41 6a5.11 5.11 0 0 1 1.05-1.54 5 5 0 0 1 7.08 0A5.11 5.11 0 0 1 16.59 6 4 4 0 0 1 18 13.87V21H6Z"/><line x1="6" y1="17" x2="18" y2="17"/></>,
};

function Icon({ name, size = 20, className = "", strokeWidth = 1.75 }) {
  const p = PATHS[name];
  if (!p) return null;
  return (
    <svg
      xmlns="http://www.w3.org/2000/svg"
      width={size}
      height={size}
      viewBox="0 0 24 24"
      fill="none"
      stroke="currentColor"
      strokeWidth={strokeWidth}
      strokeLinecap="round"
      strokeLinejoin="round"
      className={"shrink-0 inline-block " + className}
      aria-hidden="true"
    >
      {p}
    </svg>
  );
}

window.Icon = Icon;
