/* 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, 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}>
    <path d="M6.25 2.75H5.25C4.145 2.75 3.25 3.645 3.25 4.75V14.25C3.25 15.355 4.145 16.25 5.25 16.25H12.75C13.855 16.25 14.75 15.355 14.75 14.25V4.75C14.75 3.645 13.855 2.75 12.75 2.75H11.75"/>
    <path d="M10.75 1.25H7.25C6.698 1.25 6.25 1.6977 6.25 2.25V3.25C6.25 3.8023 6.698 4.25 7.25 4.25H10.75C11.302 4.25 11.75 3.8023 11.75 3.25V2.25C11.75 1.6977 11.302 1.25 10.75 1.25Z"/>
    <path d="M9 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 9Z" fill="currentColor" stroke="none"/>
    <path d="M11.1011 14H6.89903C6.49233 14 6.10855 13.8013 5.87175 13.4683C5.63935 13.1407 5.57874 12.7207 5.70964 12.3453C6.19794 10.943 7.52013 10.0001 9.00013 10.0001C10.4801 10.0001 11.8023 10.943 12.2911 12.3458C12.4215 12.7208 12.361 13.1407 12.1286 13.4684C11.8918 13.8014 11.5078 14 11.1011 14Z" fill="currentColor" stroke="none"/>
  </svg>
);

const Suitcase = ({ 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="M1.75,8.75c1.421,.616,3.966,1.503,7.25,1.503s5.829-.887,7.25-1.503"/>
    <line x1="9" y1="9.25" x2="9" y2="11.5"/>
    <path d="M6.25,4.75V2.25c0-.552,.448-1,1-1h3.5c.552,0,1,.448,1,1v2.5"/>
    <rect x="1.75" y="4.75" width="14.5" height="10.5" rx="2" ry="2"/>
  </svg>
);

const Newspaper = ({ 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}>
    <path d="M3.25 15.25H14.75C15.578 15.25 16.25 14.578 16.25 13.75V2.75H4.75V13.75C4.75 14.578 4.078 15.25 3.25 15.25Z"/>
    <path d="M3.25 15.25C2.422 15.25 1.75 14.578 1.75 13.75V6.75"/>
    <path d="M13.25 5.75H7.75V9.25H13.25V5.75Z"/>
    <path d="M13.25 12.25H7.75"/>
  </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,
});
