// Pyrra Icons — inline Lucide-style SVG.
// 1.5px stroke, rounded caps, currentColor.

const I = ({ children, size = 24, strokeWidth = 1.5, ...rest }) => (
  <svg
    viewBox="0 0 24 24"
    width={size}
    height={size}
    fill="none"
    stroke="currentColor"
    strokeWidth={strokeWidth}
    strokeLinecap="round"
    strokeLinejoin="round"
    {...rest}
  >
    {children}
  </svg>
);

const IconBuilding = (p) => (
  <I {...p}>
    <rect x="6" y="3" width="12" height="18" rx="1" />
    <path d="M9 7h2M13 7h2M9 11h2M13 11h2M9 15h2M13 15h2" />
  </I>
);

const IconHospital = (p) => (
  <I {...p}>
    <rect x="3" y="7" width="18" height="14" rx="1" />
    <path d="M12 4v3M9 4h6M12 11v6M9 14h6" />
  </I>
);

const IconOffice = (p) => (
  <I {...p}>
    <path d="M3 21h18M5 21V8l7-5 7 5v13" />
    <path d="M9 21v-4h6v4M9 11h2M13 11h2M9 14h2M13 14h2" />
  </I>
);

const IconChart = (p) => (
  <I {...p}>
    <path d="M4 19V8M9 19V4M14 19v-7M19 19v-3" />
  </I>
);

const IconDollar = (p) => (
  <I {...p}>
    <circle cx="12" cy="12" r="9" />
    <path d="M14.5 9c-.5-1-1.5-1.5-2.5-1.5-1.5 0-2.5 1-2.5 2 0 2.5 5 1.5 5 4 0 1-1 2-2.5 2-1 0-2-.5-2.5-1.5M12 6v1.5M12 16.5V18" />
  </I>
);

const IconFlag = (p) => (
  <I {...p}>
    <path d="M5 21V4M5 4h12l-3 4 3 4H5" />
  </I>
);

const IconMapPin = (p) => (
  <I {...p}>
    <path d="M12 2C8 7 5 10 5 14a7 7 0 0 0 14 0c0-4-3-7-7-12z" />
    <circle cx="12" cy="14" r="2.5" />
  </I>
);

const IconRack = (p) => (
  <I {...p}>
    <rect x="3" y="5" width="18" height="6" rx="1" />
    <rect x="3" y="13" width="18" height="6" rx="1" />
    <circle cx="7" cy="8" r=".8" fill="currentColor" stroke="none" />
    <circle cx="7" cy="16" r=".8" fill="currentColor" stroke="none" />
  </I>
);

const IconShield = (p) => (
  <I {...p}>
    <path d="M12 3l8 4v5c0 5-3.5 8-8 9-4.5-1-8-4-8-9V7l8-4z" />
  </I>
);

const IconShieldCheck = (p) => (
  <I {...p}>
    <path d="M12 3l8 4v5c0 5-3.5 8-8 9-4.5-1-8-4-8-9V7l8-4z" />
    <path d="M9 12l2 2 4-4" />
  </I>
);

const IconBolt = (p) => (
  <I {...p}>
    <path d="M13 3 L4 14 h7 l-1 7 9-11 h-7 z" />
  </I>
);

const IconGlobe = (p) => (
  <I {...p}>
    <circle cx="12" cy="12" r="9" />
    <path d="M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18" />
  </I>
);

const IconUsers = (p) => (
  <I {...p}>
    <circle cx="9" cy="10" r="3" />
    <circle cx="17" cy="11" r="2.5" />
    <path d="M3 20c1.5-3 4-4 6-4s4.5 1 6 4M14 19c1-2 2.5-3 4-3" />
  </I>
);

const IconLeaf = (p) => (
  <I {...p}>
    <path d="M4 20c0-9 7-15 17-15-1 10-7 16-15 16M5 19l9-9" />
  </I>
);

const IconCalendar = (p) => (
  <I {...p}>
    <rect x="3" y="5" width="18" height="14" rx="1" />
    <path d="M3 9h18M8 5V3M16 5V3" />
  </I>
);

const IconLock = (p) => (
  <I {...p}>
    <rect x="5" y="11" width="14" height="9" rx="1.5" />
    <path d="M8 11V7a4 4 0 0 1 8 0v4" />
  </I>
);

const IconArrowRight = (p) => (
  <I {...p}>
    <path d="M5 12h14M13 6l6 6-6 6" />
  </I>
);

const IconMinus = (p) => <I {...p}><path d="M5 12h14" /></I>;
const IconPlus  = (p) => <I {...p}><path d="M12 5v14M5 12h14" /></I>;
const IconSpeedometer = (p) => (
  <I {...p}>
    <path d="M4 17a8 8 0 1 1 16 0" />
    <path d="M12 17l5-5" />
    <circle cx="12" cy="17" r="1.2" />
  </I>
);
const IconCrosshair = (p) => (
  <I {...p}>
    <circle cx="12" cy="12" r="4" />
    <path d="M12 2v4M12 18v4M2 12h4M18 12h4" />
  </I>
);

Object.assign(window, {
  I,
  IconBuilding, IconHospital, IconOffice, IconChart, IconDollar, IconFlag,
  IconMapPin, IconRack, IconShield, IconShieldCheck, IconBolt, IconGlobe,
  IconUsers, IconLeaf, IconCalendar, IconLock, IconArrowRight, IconMinus,
  IconPlus, IconCrosshair, IconSpeedometer,
});
