// Custom SVG icon set. Cartoony, chunky strokes, round caps —
// matches the avatar drawing style. Each icon takes a `size` and inherits color.

const ICO = (children) => function IconRender({ size = 20, className = "", style }) {
  return (
    <svg
      viewBox="0 0 24 24"
      width={size}
      height={size}
      className={`bns-ico ${className}`}
      style={style}
      fill="none"
      stroke="currentColor"
      strokeWidth="2.4"
      strokeLinecap="round"
      strokeLinejoin="round"
      aria-hidden="true"
    >
      {children}
    </svg>
  );
};

const IconSearch = ICO(
  <>
    <circle cx="10.5" cy="10.5" r="6.5" />
    <line x1="20" y1="20" x2="15.5" y2="15.5" />
    <circle cx="9" cy="9" r="1.6" fill="currentColor" stroke="none" />
  </>
);

const IconBell = ICO(
  <>
    <path d="M6 16V10a6 6 0 0 1 12 0v6l1.5 2H4.5z" />
    <path d="M10 20a2 2 0 0 0 4 0" />
    <circle cx="18.5" cy="6" r="2" fill="currentColor" stroke="none" />
  </>
);

const IconPlus = ICO(
  <>
    <line x1="12" y1="5" x2="12" y2="19" />
    <line x1="5" y1="12" x2="19" y2="12" />
  </>
);

const IconInfo = ICO(
  <>
    <circle cx="12" cy="12" r="9" />
    <line x1="12" y1="11" x2="12" y2="16.5" />
    <circle cx="12" cy="8" r="1.2" fill="currentColor" stroke="none" />
  </>
);

const IconPlay = ICO(
  <path d="M7 4.5 L19 12 L7 19.5 Z" fill="currentColor" stroke="currentColor" />
);

const IconReplay = ICO(
  <>
    <path d="M4 12a8 8 0 1 0 2.3-5.6" />
    <polyline points="3 3 3 9 9 9" />
  </>
);

const IconArrowLeft = ICO(
  <>
    <line x1="19" y1="12" x2="6" y2="12" />
    <polyline points="11 6 5 12 11 18" />
  </>
);

const IconArrowRight = ICO(
  <>
    <line x1="5" y1="12" x2="18" y2="12" />
    <polyline points="13 6 19 12 13 18" />
  </>
);

const IconChevronLeft = ICO(<polyline points="15 5 8 12 15 19" />);
const IconChevronRight = ICO(<polyline points="9 5 16 12 9 19" />);

const IconMenu = ICO(
  <>
    <line x1="5" y1="7" x2="19" y2="7" />
    <line x1="5" y1="12" x2="19" y2="12" />
    <line x1="5" y1="17" x2="19" y2="17" />
  </>
);

const IconDownload = ICO(
  <>
    <path d="M12 4 v12" />
    <polyline points="6 11 12 17 18 11" />
    <line x1="4" y1="20" x2="20" y2="20" />
  </>
);

const IconClose = ICO(
  <>
    <line x1="6" y1="6" x2="18" y2="18" />
    <line x1="18" y1="6" x2="6" y2="18" />
  </>
);

const IconSparkle = ICO(
  <>
    <path d="M12 3 l1.6 5.4 5.4 1.6 -5.4 1.6 -1.6 5.4 -1.6 -5.4 -5.4 -1.6 5.4 -1.6z" fill="currentColor" stroke="currentColor" strokeLinejoin="round"/>
    <circle cx="19" cy="5" r="1" fill="currentColor" stroke="none"/>
    <circle cx="5" cy="18" r="1" fill="currentColor" stroke="none"/>
  </>
);

const IconAt = ICO(
  <>
    <circle cx="12" cy="12" r="9" />
    <circle cx="12" cy="12" r="3.5" />
    <path d="M15.5 12v2.5a2 2 0 0 0 4 0V12" />
  </>
);

const IconCalendar = ICO(
  <>
    <rect x="3.5" y="5.5" width="17" height="14" rx="2.5" />
    <line x1="3.5" y1="10" x2="20.5" y2="10" />
    <line x1="8" y1="3.5" x2="8" y2="6.5" />
    <line x1="16" y1="3.5" x2="16" y2="6.5" />
    <circle cx="8" cy="14" r="1" fill="currentColor" stroke="none"/>
    <circle cx="12" cy="14" r="1" fill="currentColor" stroke="none"/>
    <circle cx="16" cy="14" r="1" fill="currentColor" stroke="none"/>
  </>
);

const IconLinkedIn = ICO(
  <>
    <rect x="3" y="3" width="18" height="18" rx="3" />
    <line x1="7" y1="10" x2="7" y2="17" />
    <circle cx="7" cy="7" r="1.2" fill="currentColor" stroke="none"/>
    <path d="M11 17v-7m0 2.5c0-1.5 1-2.5 2.5-2.5s2.5 1 2.5 2.5V17" />
  </>
);

const IconInstagram = ICO(
  <>
    <rect x="3" y="3" width="18" height="18" rx="5" />
    <circle cx="12" cy="12" r="4" />
    <circle cx="17.5" cy="6.5" r="1.2" fill="currentColor" stroke="none"/>
  </>
);

const IconPhone = ICO(
  <path d="M5 4.5h3l1.6 4-2 1.4a12 12 0 0 0 6.5 6.5l1.4-2 4 1.6V19a1.5 1.5 0 0 1-1.6 1.5A15 15 0 0 1 3.5 6.1 1.5 1.5 0 0 1 5 4.5z"/>
);

const IconGitHub = ICO(
  <>
    <path d="M9 19.5c-3 1-3-1.5-4.5-2M15 22v-3.2a3 3 0 0 0-.8-2.2c2.7-.3 5.5-1.3 5.5-6a4.7 4.7 0 0 0-1.3-3.2 4.4 4.4 0 0 0-.1-3.2s-1-.3-3.4 1.2a11.6 11.6 0 0 0-6 0C6.5 3.9 5.5 4.2 5.5 4.2a4.4 4.4 0 0 0-.1 3.2A4.7 4.7 0 0 0 4 10.6c0 4.7 2.8 5.7 5.5 6a3 3 0 0 0-.8 2.2V22"/>
  </>
);

/* ── Project logo marks ─────────────────────────────────────────── */
// Dumbbell — Gym Tracker
const IconLogoGym = ICO(
  <>
    <rect x="1.5" y="8" width="3" height="8" rx="1" fill="currentColor" stroke="none"/>
    <rect x="19.5" y="8" width="3" height="8" rx="1" fill="currentColor" stroke="none"/>
    <rect x="4.5" y="10" width="2.5" height="4" rx=".6" fill="currentColor" stroke="none"/>
    <rect x="17" y="10" width="2.5" height="4" rx=".6" fill="currentColor" stroke="none"/>
    <line x1="7" y1="12" x2="17" y2="12" strokeWidth="3"/>
  </>
);

// Cloud + play — Cloud Meet
const IconLogoCloudMeet = ICO(
  <>
    <path d="M7 18 a4 4 0 0 1 0-8 5.5 5.5 0 0 1 10-1.8 4 4 0 0 1 .8 9.8 z"/>
    <polygon points="10.5 10.5 15 13.2 10.5 16" fill="currentColor" stroke="none"/>
  </>
);

// 3 connected nodes — Council of LLM
const IconLogoLLM = ICO(
  <>
    <line x1="7" y1="8" x2="17" y2="8"/>
    <line x1="7.5" y1="9.5" x2="11" y2="15.2"/>
    <line x1="16.5" y1="9.5" x2="13" y2="15.2"/>
    <circle cx="6" cy="7.5" r="2.8" fill="currentColor" stroke="currentColor"/>
    <circle cx="18" cy="7.5" r="2.8" fill="currentColor" stroke="currentColor"/>
    <circle cx="12" cy="17" r="2.8" fill="currentColor" stroke="currentColor"/>
  </>
);

// Magnifying glass with bar chart inside — Public Profile Competitor Analyzer
const IconLogoAnalyzer = ICO(
  <>
    <circle cx="10" cy="10" r="6.8"/>
    <line x1="14.9" y1="14.9" x2="20" y2="20" strokeWidth="2.6"/>
    <rect x="6.8" y="9.2" width="1.6" height="4" rx=".4" fill="currentColor" stroke="none"/>
    <rect x="9.2" y="6.8" width="1.6" height="6.4" rx=".4" fill="currentColor" stroke="none"/>
    <rect x="11.6" y="10.4" width="1.6" height="2.8" rx=".4" fill="currentColor" stroke="none"/>
  </>
);

// Wallet with card slot — Finance Management
const IconLogoFinance = ICO(
  <>
    <rect x="2.5" y="6" width="19" height="13" rx="2.5"/>
    <path d="M21.5 10.5 L17 10.5 a1.8 1.8 0 0 0 0 3.6 L21.5 14.1" fill="none"/>
    <circle cx="17.5" cy="12.3" r="1" fill="currentColor" stroke="none"/>
    <line x1="6" y1="3.5" x2="18" y2="3.5" strokeWidth="2.4"/>
  </>
);

const IconCheck = ICO(<polyline points="5 12 10 17 19 7" />);

const IconMountain = ICO(
  <>
    <path d="M3 19 L8 11 L11 14.5 L15.5 7 L21 19 Z" />
    <circle cx="16" cy="6" r="1.6" fill="currentColor" stroke="none"/>
  </>
);

const IconRocket = ICO(
  <>
    <path d="M12 3 c3 2 4.5 5 4.5 9 v5 H7.5 v-5 c0-4 1.5-7 4.5-9z" />
    <circle cx="12" cy="10" r="1.6" fill="currentColor" stroke="none"/>
    <path d="M7.5 14 L4 17 L8 16 M16.5 14 L20 17 L16 16" />
    <path d="M10 20 l-1 2 M14 20 l1 2" />
  </>
);

const IconCode = ICO(
  <>
    <polyline points="8 7 3 12 8 17" />
    <polyline points="16 7 21 12 16 17" />
    <line x1="14" y1="5" x2="10" y2="19" />
  </>
);

const IconBolt = ICO(
  <path d="M13 3 L4 14 H11 L10 21 L20 9 H13 Z" fill="currentColor" stroke="currentColor" strokeLinejoin="round"/>
);

const IconStar = ICO(
  <path d="M12 3 l2.6 6 6.4 .6 -5 4.4 1.5 6.4 -5.5 -3.4 -5.5 3.4 1.5 -6.4 -5 -4.4 6.4 -.6z" fill="currentColor" stroke="currentColor" strokeLinejoin="round"/>
);

const IconHeart = ICO(
  <path d="M12 20s-7-4.5-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.5-7 10-7 10z" fill="currentColor" stroke="currentColor" strokeLinejoin="round"/>
);

const IconKbd = ICO(
  <>
    <rect x="3.5" y="6" width="17" height="12" rx="2.5"/>
    <line x1="6.5" y1="14" x2="17.5" y2="14"/>
    <circle cx="7.5" cy="10" r="0.8" fill="currentColor" stroke="none"/>
    <circle cx="11" cy="10" r="0.8" fill="currentColor" stroke="none"/>
    <circle cx="14.5" cy="10" r="0.8" fill="currentColor" stroke="none"/>
  </>
);

Object.assign(window, {
  IconSearch, IconBell, IconPlus, IconInfo, IconPlay, IconReplay,
  IconArrowLeft, IconArrowRight, IconChevronLeft, IconChevronRight,
  IconMenu, IconDownload, IconClose, IconSparkle, IconAt, IconCalendar,
  IconLinkedIn, IconInstagram, IconPhone, IconGitHub, IconCheck, IconMountain, IconRocket,
  IconLogoGym, IconLogoCloudMeet, IconLogoLLM, IconLogoAnalyzer, IconLogoFinance,
  IconCode, IconBolt, IconStar, IconHeart, IconKbd,
});
