// Icon set — stroke icons, 1.5px. Lucide-style.
const icon = (paths, size=16) => (props) => {
  const { size: s = size, stroke = 'currentColor', fill = 'none', ...rest } = props || {};
  return (
    <svg width={s} height={s} viewBox="0 0 24 24" stroke={stroke} fill={fill} strokeWidth={1.5} strokeLinecap="round" strokeLinejoin="round" {...rest}>
      {paths}
    </svg>
  );
};

const IconGrid = icon(<>
  <rect x="3" y="3" width="7" height="7" rx="1" />
  <rect x="14" y="3" width="7" height="7" rx="1" />
  <rect x="3" y="14" width="7" height="7" rx="1" />
  <rect x="14" y="14" width="7" height="7" rx="1" />
</>);
const IconList = icon(<>
  <line x1="8" y1="6" x2="21" y2="6" />
  <line x1="8" y1="12" x2="21" y2="12" />
  <line x1="8" y1="18" x2="21" y2="18" />
  <circle cx="4" cy="6" r="1" fill="currentColor" stroke="none"/>
  <circle cx="4" cy="12" r="1" fill="currentColor" stroke="none"/>
  <circle cx="4" cy="18" r="1" fill="currentColor" stroke="none"/>
</>);
const IconFolder = icon(<path d="M4 7a2 2 0 0 1 2-2h4l2 2h6a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2Z" />);
const IconShare = icon(<>
  <path d="M4 12v7a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-7" />
  <polyline points="16 6 12 2 8 6" />
  <line x1="12" y1="2" x2="12" y2="15" />
</>);
const IconDroplet = icon(<path d="M12 3s-6 7-6 11a6 6 0 0 0 12 0c0-4-6-11-6-11Z" />);
const IconDownload = icon(<>
  <path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2" />
  <polyline points="8 11 12 15 16 11" />
  <line x1="12" y1="3" x2="12" y2="15" />
</>);
const IconTrash = icon(<>
  <polyline points="4 7 20 7" />
  <path d="M6 7v13a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7" />
  <path d="M9 7V5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2" />
</>);
const IconCheck = icon(<polyline points="4 12 10 18 20 6" />);
const IconX = icon(<>
  <line x1="6" y1="6" x2="18" y2="18" />
  <line x1="18" y1="6" x2="6" y2="18" />
</>);
const IconStar = icon(<polygon points="12 3 14.5 9 21 9.5 16 14 17.5 20.5 12 17 6.5 20.5 8 14 3 9.5 9.5 9" />);
const IconZoom = icon(<>
  <circle cx="11" cy="11" r="7" />
  <line x1="16" y1="16" x2="21" y2="21" />
</>);
const IconInfo = icon(<>
  <circle cx="12" cy="12" r="9" />
  <line x1="12" y1="11" x2="12" y2="16" />
  <circle cx="12" cy="8" r="0.5" fill="currentColor" stroke="none" strokeWidth="2"/>
</>);
const IconSliders = icon(<>
  <line x1="4" y1="6" x2="20" y2="6" />
  <line x1="4" y1="12" x2="20" y2="12" />
  <line x1="4" y1="18" x2="20" y2="18" />
  <circle cx="9" cy="6" r="2" fill="var(--bg-2)" />
  <circle cx="15" cy="12" r="2" fill="var(--bg-2)" />
  <circle cx="7" cy="18" r="2" fill="var(--bg-2)" />
</>);
const IconBA = icon(<>
  <rect x="3" y="5" width="18" height="14" rx="1" />
  <line x1="12" y1="5" x2="12" y2="19" />
</>);
const IconChevL = icon(<polyline points="15 6 9 12 15 18" />);
const IconChevR = icon(<polyline points="9 6 15 12 9 18" />);
const IconChevD = icon(<polyline points="6 9 12 15 18 9" />);
const IconChevU = icon(<polyline points="6 15 12 9 18 15" />);
const IconPlus = icon(<>
  <line x1="12" y1="5" x2="12" y2="19" />
  <line x1="5" y1="12" x2="19" y2="12" />
</>);
const IconSearch = icon(<>
  <circle cx="11" cy="11" r="7" />
  <line x1="16.5" y1="16.5" x2="21" y2="21" />
</>);
const IconCamera = icon(<>
  <path d="M4 7h3l1-2h8l1 2h3a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1Z" />
  <circle cx="12" cy="13" r="3.5" />
</>);
const IconWifi = icon(<>
  <path d="M5 12a10 10 0 0 1 14 0" />
  <path d="M8.5 15a5 5 0 0 1 7 0" />
  <circle cx="12" cy="18" r="0.8" fill="currentColor" stroke="none" />
</>);
const IconLive = icon(<>
  <circle cx="12" cy="12" r="3" fill="currentColor" stroke="none" />
  <circle cx="12" cy="12" r="7" />
  <circle cx="12" cy="12" r="10" opacity="0.4"/>
</>);
const IconLogout = icon(<>
  <path d="M9 5H5a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h4" />
  <polyline points="16 8 20 12 16 16" />
  <line x1="20" y1="12" x2="10" y2="12" />
</>);
const IconCopy = icon(<>
  <rect x="9" y="9" width="12" height="12" rx="1.5" />
  <path d="M5 15V5a1 1 0 0 1 1-1h10" />
</>);
const IconEye = icon(<>
  <path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z" />
  <circle cx="12" cy="12" r="3" />
</>);
const IconWand = icon(<>
  <line x1="4" y1="20" x2="15" y2="9" />
  <path d="M17 3l1 2 2 1-2 1-1 2-1-2-2-1 2-1z" />
</>);
const IconLink = icon(<>
  <path d="M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1.2 1.2" />
  <path d="M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1.2-1.2" />
</>);
const IconMenu = icon(<>
  <line x1="4" y1="7" x2="20" y2="7" />
  <line x1="4" y1="12" x2="20" y2="12" />
  <line x1="4" y1="17" x2="20" y2="17" />
</>);
const IconSort = icon(<>
  <path d="M7 4v14" />
  <polyline points="3 8 7 4 11 8" />
  <path d="M17 20V6" />
  <polyline points="13 16 17 20 21 16" />
</>);
const IconFilter = icon(<polygon points="3 5 21 5 14 13 14 20 10 18 10 13" />);
const IconEdit = icon(<>
  <path d="M4 20h4L19 9l-4-4L4 16Z" />
  <line x1="14" y1="6" x2="18" y2="10" />
</>);
const IconTag = icon(<>
  <path d="M3 11V4a1 1 0 0 1 1-1h7l10 10-8 8L3 11Z" />
  <circle cx="8" cy="8" r="1.2" fill="currentColor" stroke="none" />
</>);
const IconStack = icon(<>
  <polygon points="12 3 3 8 12 13 21 8 12 3" />
  <polyline points="3 13 12 18 21 13" />
  <polyline points="3 18 12 21 21 18" opacity="0.6" />
</>);
const IconChart = icon(<>
  <line x1="4" y1="20" x2="20" y2="20" />
  <rect x="5" y="12" width="3" height="7" />
  <rect x="10.5" y="8" width="3" height="11" />
  <rect x="16" y="14" width="3" height="5" />
</>);
const IconBolt = icon(<polygon points="13 3 4 14 11 14 10 21 20 9 13 9 14 3" />);
const IconPick = icon(<path d="M7 5l7 7-4 8-3-3-3 3V5Z" />);
const IconKbd = icon(<>
  <rect x="2" y="6" width="20" height="12" rx="2" />
  <line x1="6" y1="10" x2="6.01" y2="10" />
  <line x1="10" y1="10" x2="10.01" y2="10" />
  <line x1="14" y1="10" x2="14.01" y2="10" />
  <line x1="18" y1="10" x2="18.01" y2="10" />
  <line x1="7" y1="14" x2="17" y2="14" />
</>);
const IconWatermark = icon(<>
  <rect x="3" y="4" width="18" height="16" rx="2" />
  <text x="12" y="15" fontSize="7" textAnchor="middle" fill="currentColor" stroke="none" fontFamily="monospace" fontWeight="700">©</text>
</>);

Object.assign(window, {
  IconGrid, IconList, IconFolder, IconShare, IconDroplet, IconDownload, IconTrash,
  IconCheck, IconX, IconStar, IconZoom, IconInfo, IconSliders, IconBA, IconChevL,
  IconChevR, IconChevD, IconChevU, IconPlus, IconSearch, IconCamera, IconWifi,
  IconLive, IconLogout, IconCopy, IconEye, IconWand, IconLink, IconMenu, IconSort,
  IconFilter, IconEdit, IconTag, IconPick, IconKbd,
  IconStack, IconChart, IconBolt, IconWatermark,
});
