/* シンプルなライン系アイコン（stroke ベース） */
const Ic = ({ d, size = 20, sw = 1.7, fill = "none", children, vb = 24 }) => (
  <svg width={size} height={size} viewBox={`0 0 ${vb} ${vb}`} fill={fill} stroke="currentColor"
       strokeWidth={sw} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
    {d ? <path d={d} /> : children}
  </svg>
);

const Icons = {
  home: (p) => <Ic {...p} d="M3 11.5 12 4l9 7.5M5 10v9.5h5v-6h4v6h5V10" />,
  search: (p) => <Ic {...p}><circle cx="11" cy="11" r="7" /><path d="m20 20-3.2-3.2" /></Ic>,
  star: ({ size = 18, filled = true }) => (
    <svg width={size} height={size} viewBox="0 0 24 24" fill={filled ? "currentColor" : "none"} stroke="currentColor" strokeWidth="1.6" strokeLinejoin="round" aria-hidden="true">
      <path d="M12 3.2l2.6 5.3 5.8.85-4.2 4.1 1 5.8L12 17.7 6.8 19.2l1-5.8-4.2-4.1 5.8-.85z" />
    </svg>
  ),
  starHalf: ({ size = 18 }) => (
    <svg width={size} height={size} viewBox="0 0 24 24" aria-hidden="true">
      <defs><linearGradient id="sh"><stop offset="50%" stopColor="currentColor" /><stop offset="50%" stopColor="transparent" /></linearGradient></defs>
      <path d="M12 3.2l2.6 5.3 5.8.85-4.2 4.1 1 5.8L12 17.7 6.8 19.2l1-5.8-4.2-4.1 5.8-.85z" fill="url(#sh)" stroke="currentColor" strokeWidth="1.6" strokeLinejoin="round" />
    </svg>
  ),
  chat: (p) => <Ic {...p} d="M4 5h16v11H9l-4 3.5V16H4z" />,
  calendar: (p) => <Ic {...p}><rect x="3.5" y="4.5" width="17" height="16" rx="2.5" /><path d="M3.5 9h17M8 3v3M16 3v3" /></Ic>,
  pipeline: (p) => <Ic {...p}><path d="M4 6h16M4 12h10M4 18h6" /></Ic>,
  profile: (p) => <Ic {...p}><path d="M4 20v-1a6 6 0 0 1 12 0v1" /><circle cx="10" cy="8" r="3.5" /><path d="M18 4l1.2 2.4L22 7l-2 1.8.5 2.7L18 10l-2.5 1.5.5-2.7-2-1.8 2.8-.6z" /></Ic>,
  dash: (p) => <Ic {...p}><rect x="3.5" y="3.5" width="7" height="7" rx="1.5" /><rect x="13.5" y="3.5" width="7" height="7" rx="1.5" /><rect x="3.5" y="13.5" width="7" height="7" rx="1.5" /><rect x="13.5" y="13.5" width="7" height="7" rx="1.5" /></Ic>,
  bell: (p) => <Ic {...p} d="M6 9a6 6 0 1 1 12 0c0 5 2 6 2 6H4s2-1 2-6M9.5 19a2.5 2.5 0 0 0 5 0" />,
  send: (p) => <Ic {...p} d="M4.5 12 20 4l-5 16-4-6.5z M4.5 12l6.5 1.5" />,
  check: (p) => <Ic {...p} d="M5 12.5l4.5 4.5L19 6.5" />,
  checkCircle: (p) => <Ic {...p}><circle cx="12" cy="12" r="8.5" /><path d="M8.5 12.2l2.4 2.4 4.6-5" /></Ic>,
  consult: (p) => <Ic {...p}><circle cx="12" cy="12" r="8.5" /><path d="M12 8v5M12 16h.01" /></Ic>,
  miss: (p) => <Ic {...p}><circle cx="12" cy="12" r="8.5" /><path d="M9 9l6 6M15 9l-6 6" /></Ic>,
  arrowRight: (p) => <Ic {...p} d="M5 12h14M13 6l6 6-6 6" />,
  arrowLeft: (p) => <Ic {...p} d="M19 12H5M11 6l-6 6 6 6" />,
  chevronDown: (p) => <Ic {...p} d="M6 9l6 6 6-6" />,
  plus: (p) => <Ic {...p} d="M12 5v14M5 12h14" />,
  clock: (p) => <Ic {...p}><circle cx="12" cy="12" r="8.5" /><path d="M12 7.5V12l3 2" /></Ic>,
  user: (p) => <Ic {...p}><circle cx="12" cy="8" r="4" /><path d="M5 20a7 7 0 0 1 14 0" /></Ic>,
  sparkle: (p) => <Ic {...p} d="M12 3l1.8 4.8L18.6 9.6 13.8 11.4 12 16.2 10.2 11.4 5.4 9.6 10.2 7.8z" />,
  edit: (p) => <Ic {...p} d="M4 20h4L18.5 9.5a2 2 0 0 0-3-3L5 17v3z M14 6l3 3" />,
  filter: (p) => <Ic {...p} d="M4 6h16M7 12h10M10 18h4" />,
  location: (p) => <Ic {...p}><path d="M12 21s7-6.3 7-11a7 7 0 1 0-14 0c0 4.7 7 11 7 11z" /><circle cx="12" cy="10" r="2.6" /></Ic>,
  paw: (p) => <Ic {...p} fill="currentColor" stroke="none"><circle cx="7.5" cy="9" r="1.9" /><circle cx="12" cy="7.2" r="1.9" /><circle cx="16.5" cy="9" r="1.9" /><path d="M12 12c-2.5 0-4.5 1.7-4.5 3.8 0 1.6 1.4 2.4 3 2.4.7 0 1-.2 1.5-.2s.8.2 1.5.2c1.6 0 3-.8 3-2.4 0-2.1-2-3.8-4.5-3.8z" /></Ic>,
  dot: ({ size = 8, color = "currentColor" }) => <svg width={size} height={size} viewBox="0 0 8 8" aria-hidden="true"><circle cx="4" cy="4" r="4" fill={color} /></svg>,
  menu: (p) => <Ic {...p} d="M4 7h16M4 12h16M4 17h16" />,
  x: (p) => <Ic {...p} d="M6 6l12 12M18 6 6 18" />,
  lock: (p) => <Ic {...p}><rect x="5" y="10.5" width="14" height="9.5" rx="2" /><path d="M8 10.5V8a4 4 0 0 1 8 0v2.5" /></Ic>,
  task: (p) => <Ic {...p}><rect x="4" y="4.5" width="16" height="16" rx="2.5" /><path d="M8.5 12l2 2 4-4.5" /></Ic>,
  heart: (p) => <Ic {...p} d="M12 20s-7-4.3-7-9.3A4 4 0 0 1 12 7a4 4 0 0 1 7 3.7c0 5-7 9.3-7 9.3z" />,
  shield: (p) => <Ic {...p} d="M12 3l7 2.5v5.5c0 4.6-3.1 8-7 9.5-3.9-1.5-7-4.9-7-9.5V5.5z" />,
  job: (p) => <Ic {...p}><rect x="3.5" y="7.5" width="17" height="12" rx="2.5" /><path d="M8.5 7.5V6a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v1.5M3.5 12.5h17" /></Ic>,
  link: (p) => <Ic {...p}><path d="M9 15l6-6M10.5 6.5l1.6-1.6a3.6 3.6 0 0 1 5.1 5.1l-1.6 1.6M13.5 17.5l-1.6 1.6a3.6 3.6 0 0 1-5.1-5.1l1.6-1.6" /></Ic>,
  copy: (p) => <Ic {...p}><rect x="8" y="8" width="12" height="12" rx="2" /><path d="M4 16V6a2 2 0 0 1 2-2h10" /></Ic>,
  trash: (p) => <Ic {...p} d="M5 7h14M10 7V5h4v2M6 7l1 13h10l1-13" />,
};

window.SV_Icons = Icons;
