/* icons.jsx — lucide-style stroke icons used across the app */
(function () {
  const S = (paths, extra) =>
    function Icon(props) {
      const { size = 20, ...rest } = props || {};
      return (
        <svg
          xmlns="http://www.w3.org/2000/svg"
          width={size}
          height={size}
          viewBox="0 0 24 24"
          fill="none"
          stroke="currentColor"
          strokeWidth="2"
          strokeLinecap="round"
          strokeLinejoin="round"
          {...rest}
        >
          {paths}
        </svg>
      );
    };

  const Icons = {
    Search: S(<><circle cx="11" cy="11" r="8" /><path d="m21 21-4.3-4.3" /></>),
    Menu: S(<><path d="M4 6h16M4 12h16M4 18h16" /></>),
    X: S(<><path d="M18 6 6 18M6 6l12 12" /></>),
    Sun: S(<><circle cx="12" cy="12" r="4" /><path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M6.3 17.7l-1.4 1.4M19.1 4.9l-1.4 1.4" /></>),
    Moon: S(<><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z" /></>),
    Clock: S(<><circle cx="12" cy="12" r="9" /><path d="M12 7v5l3 2" /></>),
    Users: S(<><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" /><circle cx="9" cy="7" r="4" /><path d="M22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75" /></>),
    Flame: S(<><path d="M8.5 14.5A2.5 2.5 0 0 0 11 17c1.5 0 3-1 3-3 0-1.5-1-2-1-3.5C13 8 14 7 14 7s-2 0-3 1.5C9.5 10 8.5 12 8.5 14.5Z" /><path d="M12 2c1 2.5-1 4-1 6 0 1.5 1 2.5 1 2.5" /></>),
    Check: S(<><path d="M20 6 9 17l-5-5" /></>),
    Printer: S(<><path d="M6 9V2h12v7M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2" /><rect x="6" y="14" width="12" height="8" rx="1" /></>),
    ChevronRight: S(<><path d="m9 18 6-6-6-6" /></>),
    ChevronLeft: S(<><path d="m15 18-6-6 6-6" /></>),
    ArrowRight: S(<><path d="M5 12h14M13 5l7 7-7 7" /></>),
    ArrowUpRight: S(<><path d="M7 17 17 7M7 7h10v10" /></>),
    Command: S(<><path d="M15 6a3 3 0 1 1 3 3H6a3 3 0 1 1 3-3v12a3 3 0 1 1-3-3h12a3 3 0 1 1-3 3Z" /></>),
    Maximize: S(<><path d="M8 3H5a2 2 0 0 0-2 2v3M21 8V5a2 2 0 0 0-2-2h-3M3 16v3a2 2 0 0 0 2 2h3M16 21h3a2 2 0 0 0 2-2v-3" /></>),
    Utensils: S(<><path d="M3 2v7c0 1.1.9 2 2 2h0a2 2 0 0 0 2-2V2M5 2v20M21 15V2a5 5 0 0 0-3 5v6c0 1 1 2 2 2h1Zm0 0v7" /></>),
    Leaf: S(<><path d="M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z" /><path d="M2 21c0-3 1.85-5.36 5.08-6" /></>),
    Sprout: S(<><path d="M7 20h10M10 20c5.5-2.5.8-6.4 3-10M9.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.8ZM14.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" /></>),
    Book: S(<><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20" /><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2Z" /></>),
    Plus: S(<><path d="M5 12h14M12 5v14" /></>),
    Minus: S(<><path d="M5 12h14" /></>),
    RotateCcw: S(<><path d="M3 12a9 9 0 1 0 3-6.7L3 8M3 3v5h5" /></>),
    Github: S(<><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22" /></>),
    Mail: S(<><rect x="2" y="4" width="20" height="16" rx="2" /><path d="m22 7-10 5L2 7" /></>),
    Link: S(<><path d="M10 13a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-1 1" /><path d="M14 11a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l1-1" /></>),
    Sliders: S(<><path d="M4 21v-7M4 10V3M12 21v-9M12 8V3M20 21v-5M20 12V3M1 14h6M9 8h6M17 16h6" /></>),
    ChefHat: S(<><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" /><path d="M6 17h12" /></>),
    Bookmark: S(<><path d="m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2Z" /></>),
    Snowflake: S(<><path d="M12 2v20M4.93 4.93l14.14 14.14M2 12h20M19.07 4.93 4.93 19.07M5 8l4 1 1-4M14 19l1-4 4 1M19 8l-4 1-1-4M10 19l-1-4-4 1" /></>),
    Timer: S(<><path d="M10 2h4M12 14l3-3" /><circle cx="12" cy="14" r="8" /></>),
    Egg: S(<><path d="M12 22c-4.4 0-8-3.6-8-8 0-5 3.6-12 8-12s8 7 8 12c0 4.4-3.6 8-8 8Z" /></>),
  };

  Object.assign(window, { Icons });
})();
