/* global React */
// Lucide-style inline SVG icons. Stroke 1.6 default, currentColor.
// Exported to window for cross-script sharing.

const Icon = (path, opts = {}) => {
  const Component = ({ size = 16, strokeWidth = 1.7, style, ...rest }) => (
    <svg
      xmlns="http://www.w3.org/2000/svg"
      width={size}
      height={size}
      viewBox="0 0 24 24"
      fill={opts.filled ? "currentColor" : "none"}
      stroke="currentColor"
      strokeWidth={strokeWidth}
      strokeLinecap="round"
      strokeLinejoin="round"
      style={style}
      {...rest}
    >
      {path}
    </svg>
  );
  Component.displayName = opts.name || "Icon";
  return Component;
};

const Home = Icon(<><path d="M3 9.5 12 3l9 6.5V20a1 1 0 0 1-1 1h-5v-6h-6v6H4a1 1 0 0 1-1-1Z"/></>, { name: "Home" });
const ListChecks = Icon(<><path d="M3 6h13M3 12h13M3 18h13"/><path d="M19 5l1.5 1.5L23 4"/><path d="M19 11l1.5 1.5L23 10"/><path d="M19 17l1.5 1.5L23 16"/></>, { name: "ListChecks" });
const Users = Icon(<><circle cx="9" cy="8" r="3.2"/><path d="M3 20c0-3.3 2.7-6 6-6s6 2.7 6 6"/><circle cx="17" cy="9" r="2.6"/><path d="M21 18c0-2.3-1.8-4.2-4-4.2"/></>, { name: "Users" });
const Activity = Icon(<><path d="M3 12h4l2.5-7 5 14 2.5-7H21"/></>, { name: "Activity" });
const MessageCircle = Icon(<><path d="M21 12a8.5 8.5 0 1 1-3.7-7l3.7-1-1 3.7A8.5 8.5 0 0 1 21 12Z"/></>, { name: "MessageCircle" });
const ArrowRight = ({ size = 16, strokeWidth = 1, style, ...rest }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 12 12"
    fill="none" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round"
    strokeWidth={strokeWidth} style={style} {...rest}>
    <line x1="1" y1="6" x2="10.75" y2="6"/>
    <polyline points="7.75 9.25 11 6 7.75 2.75"/>
  </svg>
);
const ChevronDown = Icon(<><path d="m6 9 6 6 6-6"/></>, { name: "ChevronDown" });
const ChevronUp = Icon(<><path d="m6 15 6-6 6 6"/></>, { name: "ChevronUp" });
const ExternalLink = Icon(<><path d="M14 5h5v5"/><path d="M19 5 10 14"/><path d="M19 13v6a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h6"/></>, { name: "ExternalLink" });
const Sparkles = Icon(<><path d="M12 3v3M12 18v3M3 12h3M18 12h3M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M5.6 18.4l2.1-2.1M16.3 7.7l2.1-2.1"/></>, { name: "Sparkles" });
const BookOpen = Icon(<><path d="M3 5a2 2 0 0 1 2-2h5v17H5a2 2 0 0 1-2-2Z"/><path d="M21 5a2 2 0 0 0-2-2h-5v17h5a2 2 0 0 0 2-2Z"/></>, { name: "BookOpen" });
const MoreHorizontal = Icon(<><circle cx="5" cy="12" r="1.5" fill="currentColor"/><circle cx="12" cy="12" r="1.5" fill="currentColor"/><circle cx="19" cy="12" r="1.5" fill="currentColor"/></>, { name: "MoreHorizontal" });
const ThumbsUp = Icon(<><path d="M7 10v11M3 13v7a1 1 0 0 0 1 1h3V10H4a1 1 0 0 0-1 1Z"/><path d="M7 10c0-3 2-5 3.5-7 .5-.5 1.4-.4 1.8.2.7 1 1 2.2 1 4l-.3 3H17c1.5 0 2.8 1.4 2.5 3l-1.3 6.5c-.2 1.2-1.3 2.3-2.5 2.3H7"/></>, { name: "ThumbsUp" });
const ThumbsDown = Icon(<><path d="M17 14V3M21 11V4a1 1 0 0 0-1-1h-3v11h3a1 1 0 0 0 1-1Z"/><path d="M17 14c0 3-2 5-3.5 7-.5.5-1.4.4-1.8-.2-.7-1-1-2.2-1-4l.3-3H7c-1.5 0-2.8-1.4-2.5-3l1.3-6.5C6 3.1 7.1 2 8.3 2H17"/></>, { name: "ThumbsDown" });
const Search = Icon(<><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></>, { name: "Search" });
const Sun = Icon(<><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M2 12h2M20 12h2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/></>, { name: "Sun" });
const Moon = Icon(<><path d="M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8Z"/></>, { name: "Moon" });
const Rocket = Icon(<><path d="M4.5 16.5c-1.5 1.3-2 5-2 5s3.7-.5 5-2c.7-.9.7-2.3-.1-3.1-.8-.8-2.2-.8-3.1.1Z"/><path d="M12 15 9 12c.7-2 2-4 4-6 3-3 6-3 7-3s0 4-3 7c-2 2-4 3.3-6 4Z"/><path d="m9 12-2 2c-.6-.4-2.4-1.6-3-2 0 0 1-2 2-3 .9-.7 2.4-.7 3.1.1L9 12Z"/><path d="m12 15 2-2c.4.6 1.6 2.4 2 3 0 0-2 1-3 2-.8.7-2.3.7-3.1-.1L12 15Z"/></>, { name: "Rocket" });
const UserPlus = Icon(<><circle cx="9" cy="8" r="3.6"/><path d="M3 20c0-3.3 2.7-6 6-6s6 2.7 6 6"/><path d="M18 8v6M21 11h-6"/></>, { name: "UserPlus" });
const Briefcase = Icon(<><rect x="3" y="7" width="18" height="13" rx="2"/><path d="M8 7V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><path d="M3 13h18"/></>, { name: "Briefcase" });
const TrendingUp = Icon(<><path d="m3 17 6-6 4 4 8-8"/><path d="M14 7h7v7"/></>, { name: "TrendingUp" });
const Crown = Icon(<><path d="m3 17 1.5-9 4 5 3.5-7 3.5 7 4-5L21 17Z"/><path d="M3 20h18"/></>, { name: "Crown" });
const Handshake = Icon(<><path d="m11 17 2 2a1.4 1.4 0 0 0 2-2"/><path d="m14 14 2.5 2.5a1.4 1.4 0 0 0 2-2L13 9l-2 2-3-3 2-2c1.7-1.7 4.3-1.7 6 0L21 11M3 13l2-2 5 5-2 2c-1.7 1.7-4.3 1.7-6 0a4 4 0 0 1 1-5Z"/></>, { name: "Handshake" });
const Package = Icon(<><path d="M21 16V8l-9-5-9 5v8l9 5Z"/><path d="m3 8 9 5 9-5M12 22V13"/></>, { name: "Package" });
const DollarSign = Icon(<><path d="M12 2v20M16 6H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H7"/></>, { name: "DollarSign" });
const Target = Icon(<><circle cx="12" cy="12" r="9"/><circle cx="12" cy="12" r="5"/><circle cx="12" cy="12" r="1.6" fill="currentColor"/></>, { name: "Target" });
const X = Icon(<><path d="M6 6l12 12M18 6 6 18"/></>, { name: "X" });
const Filter = Icon(<><path d="M3 5h18l-7 9v6l-4-2v-4Z"/></>, { name: "Filter" });
const Bookmark = Icon(<><path d="M19 21V5a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v16l7-4Z"/></>, { name: "Bookmark" });
const EyeOff = Icon(<><path d="M9.8 5.2A11 11 0 0 1 12 5c7 0 10 7 10 7a13 13 0 0 1-2.4 3.4M6.6 6.6A13 13 0 0 0 2 12s3 7 10 7c2 0 3.8-.5 5.4-1.4"/><path d="m3 3 18 18"/><path d="M9.5 9.5a3.5 3.5 0 0 0 5 5"/></>, { name: "EyeOff" });
const ChevronRight = Icon(<><path d="m9 6 6 6-6 6"/></>, { name: "ChevronRight" });
const Research = ({ size = 16, strokeWidth = 1.5, style, ...rest }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 18 18"
    fill="none" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round"
    strokeWidth={strokeWidth} style={style} {...rest}>
    <path d="m15.75,15.75l-4.1114-4.1114"/>
    <path d="m8.5123,2.3088c-.2498-.0347-.5029-.0588-.7623-.0588-3.0375,0-5.5,2.4624-5.5,5.5s2.4625,5.5,5.5,5.5c1.9805,0,3.7113-1.0503,4.6797-2.6208"/>
    <path d="m16.4873,4.0381l-1.8945-.6309-.6313-1.8945c-.1021-.3057-.3887-.5127-.7114-.5127s-.6094.207-.7114.5127l-.6313,1.8945-1.8945.6309c-.3062.1025-.5127.3887-.5127.7119s.2065.6094.5127.7119l1.8945.6309.6313,1.8945c.1021.3057.3887.5127.7114.5127s.6094-.207.7114-.5127l.6313-1.8945,1.8945-.6309c.3062-.1025.5127-.3887.5127-.7119s-.2065-.6094-.5127-.7119z" fill="currentColor" stroke="none"/>
  </svg>
);

const Clipboard = ({ size = 16, style, ...rest }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 18 18"
    fill="none" stroke="none" style={style} {...rest}>
    <path fillRule="evenodd" clipRule="evenodd" d="M12.75 2H12.475C12.352 1.154 11.63 0.5 10.75 0.5H7.25C6.371 0.5 5.648 1.154 5.525 2H5.25C3.733 2 2.5 3.233 2.5 4.75V14.25C2.5 15.767 3.733 17 5.25 17H12.75C14.267 17 15.5 15.767 15.5 14.25V4.75C15.5 3.233 14.267 2 12.75 2ZM7 2.25C7 2.112 7.112 2 7.25 2H10.75C10.888 2 11 2.112 11 2.25V3.25C11 3.388 10.888 3.5 10.75 3.5H7.25C7.112 3.5 7 3.388 7 3.25V2.25ZM9 9C9.82843 9 10.5 8.32843 10.5 7.5C10.5 6.67157 9.82843 6 9 6C8.17157 6 7.5 6.67157 7.5 7.5C7.5 8.32843 8.17157 9 9 9ZM6.899 14H11.1011C11.5078 14 11.8917 13.8014 12.1285 13.4684C12.3609 13.1407 12.4215 12.7208 12.2911 12.3458C11.8023 10.943 10.4801 10.0001 9.0001 10.0001C7.5201 10.0001 6.19791 10.943 5.70961 12.3453C5.57871 12.7207 5.63932 13.1407 5.87172 13.4683C6.10852 13.8013 6.4923 14 6.899 14Z" fill="currentColor"/>
  </svg>
);

const Suitcase = ({ size = 16, style, ...rest }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 18 18"
    fill="none" stroke="none" style={style} {...rest}>
    <path d="M11.75,5.5c-.414,0-.75-.336-.75-.75V2.25c0-.138-.112-.25-.25-.25h-3.5c-.138,0-.25,.112-.25,.25v2.5c0,.414-.336,.75-.75,.75s-.75-.336-.75-.75V2.25c0-.965,.785-1.75,1.75-1.75h3.5c.965,0,1.75,.785,1.75,1.75v2.5c0,.414-.336,.75-.75,.75Z" fill="currentColor"/>
    <path d="M17,7.519v-.769c0-1.517-1.233-2.75-2.75-2.75H3.75c-1.517,0-2.75,1.233-2.75,2.75v.769c2.184,1.149,4.643,1.83,7.25,1.943v-.212c0-.414,.336-.75,.75-.75s.75,.336,.75,.75v.212c2.607-.113,5.066-.794,7.25-1.943Z" fill="currentColor"/>
    <path d="M9.75,10.962v.538c0,.414-.336,.75-.75,.75s-.75-.336-.75-.75v-.538c-2.586-.103-5.034-.728-7.25-1.78v4.068c0,1.517,1.233,2.75,2.75,2.75H14.25c1.517,0,2.75-1.233,2.75-2.75v-4.068c-2.216,1.051-4.664,1.677-7.25,1.78Z" fill="currentColor"/>
  </svg>
);

const Newspaper = ({ size = 16, style, ...rest }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 18 18"
    fill="none" stroke="none" style={style} {...rest}>
    <path d="M16.25 2H4.75C4.336 2 4 2.336 4 2.75V13.75C4 14.164 3.664 14.5 3.25 14.5C2.836 14.5 2.5 14.164 2.5 13.75V6.75C2.5 6.336 2.164 6 1.75 6C1.336 6 1 6.336 1 6.75V13.75C1 14.991 2.009 16 3.25 16H14.75C15.991 16 17 14.991 17 13.75V2.75C17 2.336 16.664 2 16.25 2ZM13.25 11H7.75C7.336 11 7 10.664 7 10.25C7 9.836 7.336 9.5 7.75 9.5H13.25C13.664 9.5 14 9.836 14 10.25C14 10.664 13.664 11 13.25 11ZM13.25 8H7.75C7.336 8 7 7.664 7 7.25C7 6.836 7.336 6.5 7.75 6.5H13.25C13.664 6.5 14 6.836 14 7.25C14 7.664 13.664 8 13.25 8Z" fill="currentColor"/>
  </svg>
);

const ShareUpRight = ({ size = 16, strokeWidth = 1, style, ...rest }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 18 18"
    fill="none" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round"
    strokeWidth={strokeWidth} style={style} {...rest}>
    <polyline points="10.5 2.75 15.25 2.75 15.25 7.5"/>
    <line x1="15.25" y1="2.75" x2="9" y2="9"/>
    <path d="M15.25,10.5v2.75c0,1.105-.895,2-2,2H4.75c-1.105,0-2-.895-2-2V4.75c0-1.105,.895-2,2-2h2.75"/>
  </svg>
);

Object.assign(window, {
  IcoHome: Home,
  IcoListChecks: ListChecks,
  IcoUsers: Users,
  IcoActivity: Activity,
  IcoMessageCircle: MessageCircle,
  IcoArrowRight: ArrowRight,
  IcoChevronDown: ChevronDown,
  IcoChevronUp: ChevronUp,
  IcoChevronRight: ChevronRight,
  IcoExternalLink: ExternalLink,
  IcoSparkles: Sparkles,
  IcoBookOpen: BookOpen,
  IcoMoreHorizontal: MoreHorizontal,
  IcoThumbsUp: ThumbsUp,
  IcoThumbsDown: ThumbsDown,
  IcoSearch: Search,
  IcoSun: Sun,
  IcoMoon: Moon,
  IcoRocket: Rocket,
  IcoUserPlus: UserPlus,
  IcoBriefcase: Briefcase,
  IcoTrendingUp: TrendingUp,
  IcoCrown: Crown,
  IcoHandshake: Handshake,
  IcoPackage: Package,
  IcoDollarSign: DollarSign,
  IcoTarget: Target,
  IcoX: X,
  IcoFilter: Filter,
  IcoBookmark: Bookmark,
  IcoEyeOff: EyeOff,
  IcoResearch: Research,
  IcoClipboard: Clipboard,
  IcoSuitcase: Suitcase,
  IcoNewspaper: Newspaper,
  IcoShareUpRight: ShareUpRight,
});
