/* icons.jsx — bullseye logo mark + small inline icons. Exports to window. */

function Bullseye({ size = 20, color = "#fff", stroke = 2 }) {
  return (
    <svg width={size} height={size} viewBox="0 0 24 24" fill="none">
      <circle cx="12" cy="12" r="9.2" stroke={color} strokeWidth={stroke} opacity="0.9" />
      <circle cx="12" cy="12" r="5.2" stroke={color} strokeWidth={stroke} opacity="0.7" />
      <circle cx="12" cy="12" r="1.7" fill={color} />
    </svg>
  );
}

function GenCoachLogoMark({ size = 16, color = "#34d399" }) {
  return (
    <svg width={size} height={size} viewBox="0 0 24 24" fill="none">
      <circle cx="12" cy="12" r="10" stroke={color} strokeWidth="2" />
      <circle cx="12" cy="12" r="6" stroke={color} strokeWidth="2" />
      <circle cx="12" cy="12" r="2" fill={color} />
      <line x1="12" y1="0" x2="12" y2="4" stroke={color} strokeWidth="2" />
      <line x1="12" y1="20" x2="12" y2="24" stroke={color} strokeWidth="2" />
      <line x1="0" y1="12" x2="4" y2="12" stroke={color} strokeWidth="2" />
      <line x1="20" y1="12" x2="24" y2="12" stroke={color} strokeWidth="2" />
    </svg>
  );
}

function Logo() {
  return (
    <div className="brand">
      <span className="mark" style={{ width: 32, height: 32, borderRadius: 12, backgroundColor: "#0f172a", display: "inline-flex", alignItems: "center", justifyContent: "center", flexShrink: 0 }}>
        <GenCoachLogoMark size={16} color="#34d399" />
      </span>
      <span>Gen Coach</span>
    </div>
  );
}

const Icon = {
  arrow: (p) => (
    <svg className="arr" width="17" height="17" viewBox="0 0 24 24" fill="none" {...p}>
      <path d="M5 12h13M13 6l6 6-6 6" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
    </svg>
  ),
  check: (p) => (
    <svg width="14" height="14" viewBox="0 0 24 24" fill="none" {...p}>
      <path d="M5 13l4 4L19 7" stroke="currentColor" strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round" />
    </svg>
  ),
  checkCircle: (p) => (
    <svg width="16" height="16" viewBox="0 0 24 24" fill="none" {...p}>
      <circle cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="1.8" opacity="0.4" />
      <path d="M8 12l2.5 2.5L16 9" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
    </svg>
  ),
  spark: (p) => (
    <svg width="16" height="16" viewBox="0 0 24 24" fill="none" {...p}>
      <path d="M12 3l1.6 5.4L19 10l-5.4 1.6L12 17l-1.6-5.4L5 10l5.4-1.6L12 3z" fill="currentColor" />
    </svg>
  ),
  target: (p) => (
    <svg width="16" height="16" viewBox="0 0 24 24" fill="none" {...p}>
      <circle cx="12" cy="12" r="8.5" stroke="currentColor" strokeWidth="1.8" />
      <circle cx="12" cy="12" r="4" stroke="currentColor" strokeWidth="1.8" />
      <circle cx="12" cy="12" r="1.2" fill="currentColor" />
    </svg>
  ),
  gauge: (p) => (
    <svg width="16" height="16" viewBox="0 0 24 24" fill="none" {...p}>
      <path d="M4 14a8 8 0 0116 0" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" />
      <path d="M12 14l4-3" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" />
    </svg>
  ),
  cal: (p) => (
    <svg width="16" height="16" viewBox="0 0 24 24" fill="none" {...p}>
      <rect x="4" y="5" width="16" height="15" rx="2.5" stroke="currentColor" strokeWidth="1.8" />
      <path d="M4 9h16M8 3v3M16 3v3" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" />
    </svg>
  ),
  chat: (p) => (
    <svg width="16" height="16" viewBox="0 0 24 24" fill="none" {...p}>
      <path d="M5 6h14a2 2 0 012 2v7a2 2 0 01-2 2H9l-4 3V8a2 2 0 012-2z" stroke="currentColor" strokeWidth="1.8" strokeLinejoin="round" />
    </svg>
  ),
  brain: (p) => (
    <svg width="16" height="16" viewBox="0 0 24 24" fill="none" {...p}>
      <path d="M9 6a3 3 0 00-3 3 3 3 0 00-1 5.5A3 3 0 009 18m0-12a3 3 0 013 3m-3-3v12m0 0a3 3 0 003-3m3-9a3 3 0 013 3 3 3 0 011 5.5A3 3 0 0115 18m0-12a3 3 0 00-3 3" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" />
    </svg>
  ),
  layers: (p) => (
    <svg width="16" height="16" viewBox="0 0 24 24" fill="none" {...p}>
      <path d="M12 4l8 4-8 4-8-4 8-4z" stroke="currentColor" strokeWidth="1.7" strokeLinejoin="round" />
      <path d="M4 12l8 4 8-4M4 16l8 4 8-4" stroke="currentColor" strokeWidth="1.7" strokeLinejoin="round" opacity="0.6" />
    </svg>
  ),
  book: (p) => (
    <svg width="16" height="16" viewBox="0 0 24 24" fill="none" {...p}>
      <path d="M5 5a2 2 0 012-2h11v16H7a2 2 0 00-2 2V5z" stroke="currentColor" strokeWidth="1.7" strokeLinejoin="round" />
      <path d="M5 19a2 2 0 012-2h11" stroke="currentColor" strokeWidth="1.7" />
    </svg>
  ),
};

Object.assign(window, { Bullseye, GenCoachLogoMark, Logo, Icon });
