// Small shared primitives — insurance L2 sub-hub
const { useState, useEffect, useRef, useMemo } = React;

const Icon = ({ name, size = 18 }) => {
  const paths = {
    search: <path d="M11 2a9 9 0 1 0 5.3 16.3l5 5 1.4-1.4-5-5A9 9 0 0 0 11 2zm0 2a7 7 0 1 1 0 14 7 7 0 0 1 0-14z"/>,
    globe: <path d="M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM2 12h20M12 2a15 15 0 0 1 0 20M12 2a15 15 0 0 0 0 20" fill="none" stroke="currentColor" strokeWidth="1.5"/>,
    chevron: <path d="M6 9l6 6 6-6" fill="none" stroke="currentColor" strokeWidth="1.8"/>,
    arrow: <path d="M5 12h14m-6-6l6 6-6 6" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round"/>,
    arrowLeft: <path d="M19 12H5m6 6l-6-6 6-6" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round"/>,
    shield: <path d="M12 2l8 3.2V10c0 5-3.5 9.7-8 11.4C7.5 19.7 4 15 4 10V5.2L12 2z" fill="none" stroke="currentColor" strokeWidth="1.6" strokeLinejoin="round"/>,
    check: <path d="M5 12l5 5L19 7" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>,
    x: <path d="M18 6L6 18M6 6l12 12" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round"/>,
    info: <><circle cx="12" cy="12" r="10" fill="none" stroke="currentColor" strokeWidth="1.6"/><path d="M12 16v-4M12 8h.01" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round"/></>,
  };
  return <svg width={size} height={size} viewBox="0 0 24 24" fill="currentColor">{paths[name]}</svg>;
};

Object.assign(window, { Icon });
