// icons.jsx — clean 1.7px stroke line icons for Absensi MOTOART
function Icon({ name, size = 22, stroke = 'currentColor', sw = 1.7, fill = 'none', style }) {
  const p = { fill, stroke, strokeWidth: sw, strokeLinecap: 'round', strokeLinejoin: 'round' };
  const paths = {
    home: <><path d="M3 10.5 12 3l9 7.5" {...p}/><path d="M5 9.5V20a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V9.5" {...p}/></>,
    history: <><path d="M3 12a9 9 0 1 0 3-6.7M3 4v3.5h3.5" {...p}/><path d="M12 8v4l2.5 1.5" {...p}/></>,
    user: <><circle cx="12" cy="8" r="3.6" {...p}/><path d="M5 20c.8-3.5 3.6-5.2 7-5.2s6.2 1.7 7 5.2" {...p}/></>,
    grid: <><rect x="3.5" y="3.5" width="7" height="7" rx="1.6" {...p}/><rect x="13.5" y="3.5" width="7" height="7" rx="1.6" {...p}/><rect x="3.5" y="13.5" width="7" height="7" rx="1.6" {...p}/><rect x="13.5" y="13.5" width="7" height="7" rx="1.6" {...p}/></>,
    users: <><circle cx="9" cy="8" r="3.2" {...p}/><path d="M3.5 19.5c.7-3 3-4.5 5.5-4.5s4.8 1.5 5.5 4.5" {...p}/><path d="M16 5.2a3.2 3.2 0 0 1 0 5.8M17.5 15.2c2 .5 3.4 1.9 4 4.3" {...p}/></>,
    chart: <><path d="M4 20V4M4 20h16" {...p}/><rect x="7.5" y="11" width="3" height="6" rx=".8" {...p}/><rect x="12.5" y="7" width="3" height="10" rx=".8" {...p}/><rect x="17.5" y="13" width="3" height="4" rx=".8" {...p} transform="translate(-3 0)"/></>,
    clock: <><circle cx="12" cy="12" r="9" {...p}/><path d="M12 7v5l3.2 2" {...p}/></>,
    pin: <><path d="M12 21s7-5.6 7-11a7 7 0 1 0-14 0c0 5.4 7 11 7 11Z" {...p}/><circle cx="12" cy="10" r="2.6" {...p}/></>,
    calendar: <><rect x="3.5" y="5" width="17" height="16" rx="3" {...p}/><path d="M3.5 9.5h17M8 3v4M16 3v4" {...p}/></>,
    check: <><path d="M5 12.5 10 17.5 19.5 7" {...p}/></>,
    checkCircle: <><circle cx="12" cy="12" r="9" {...p}/><path d="M8 12.2l2.6 2.6L16 9.4" {...p}/></>,
    logout: <><path d="M15 4h3a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-3" {...p}/><path d="M10 12h10M16.5 8.5 20 12l-3.5 3.5" {...p}/></>,
    chevron: <><path d="M9 5l7 7-7 7" {...p}/></>,
    chevronDown: <><path d="M5 9l7 7 7-7" {...p}/></>,
    download: <><path d="M12 3v12M7.5 10.5 12 15l4.5-4.5" {...p}/><path d="M4 19.5h16" {...p}/></>,
    arrowUp: <><path d="M12 19V5M6 11l6-6 6 6" {...p}/></>,
    bell: <><path d="M6 9a6 6 0 0 1 12 0c0 5 1.5 6.5 1.5 6.5h-15S6 14 6 9Z" {...p}/><path d="M10 19a2 2 0 0 0 4 0" {...p}/></>,
    settings: <><circle cx="12" cy="12" r="3.2" {...p}/><path d="M12 2.5v2.5M12 19v2.5M21.5 12H19M5 12H2.5M18.4 5.6 16.6 7.4M7.4 16.6 5.6 18.4M18.4 18.4 16.6 16.6M7.4 7.4 5.6 5.6" {...p}/></>,
    search: <><circle cx="11" cy="11" r="6.5" {...p}/><path d="m16 16 4.5 4.5" {...p}/></>,
    filter: <><path d="M4 6h16M7 12h10M10 18h4" {...p}/></>,
    sparkle: <><path d="M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8L12 3Z" {...p}/></>,
    excel: <><rect x="4" y="3.5" width="16" height="17" rx="2.5" {...p}/><path d="M9 9l6 6M15 9l-6 6" {...p}/></>,
    pdf: <><path d="M6 3.5h8L19 8v12.5a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V4.5a1 1 0 0 1 1-1Z" {...p}/><path d="M14 3.5V8h5" {...p}/><path d="M8.5 17v-3.2h1.2a1 1 0 0 1 0 2H8.5M13 13.8V17M12.6 13.8h1.6" {...p} strokeWidth="1.3"/></>,
    phone: <><rect x="6" y="2.5" width="12" height="19" rx="3" {...p}/><path d="M10.5 18.5h3" {...p}/></>,
    coffee: <><path d="M5 8h11v5a4 4 0 0 1-4 4H9a4 4 0 0 1-4-4V8Z" {...p}/><path d="M16 9h2.5a2 2 0 0 1 0 4H16" {...p}/><path d="M7 4.5c0 .8.8 1 .8 2M11 4.5c0 .8.8 1 .8 2" {...p}/></>,
    flame: <><path d="M12 3c.5 3-2.5 4-2.5 7a2.5 2.5 0 0 0 5 0c0-.8-.3-1.4-.3-1.4 2 1.2 2.8 3 2.8 5a5 5 0 0 1-10 0c0-4 3.5-5.5 5-10.6Z" {...p}/></>,
    plus: <><path d="M12 5v14M5 12h14" {...p}/></>,
    dots: <><circle cx="5" cy="12" r="1.4" fill={stroke} stroke="none"/><circle cx="12" cy="12" r="1.4" fill={stroke} stroke="none"/><circle cx="19" cy="12" r="1.4" fill={stroke} stroke="none"/></>,
    trend: <><path d="M3 16.5 9 10l4 4 8-8" {...p}/><path d="M16 6h5v5" {...p}/></>,
    shield: <><path d="M12 3 5 5.5V11c0 4.5 3 8 7 9.5 4-1.5 7-5 7-9.5V5.5L12 3Z" {...p}/><path d="M9 11.5 11 13.5 15 9.5" {...p}/></>,
  };
  return (
    <svg width={size} height={size} viewBox="0 0 24 24" style={style} aria-hidden="true">
      {paths[name] || null}
    </svg>
  );
}

Object.assign(window, { Icon });
