/* global React */
// Custom-drawn SVG icon set for Eminencetel.
// All icons share a 24x24 viewBox, currentColor strokes/fills, stroke-width 1.6.

const ico = (paths, viewBox = '0 0 24 24') => ({ size = 24, ...props } = {}) => (
  <svg
    width={size} height={size} viewBox={viewBox}
    fill="none" stroke="currentColor"
    strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round"
    {...props}
  >{paths}</svg>
);

// === Industry icons ===
const IcoHospital = ico(<>
  <rect x="4" y="6" width="16" height="14" rx="1.5" />
  <path d="M9 20v-4h6v4" />
  <path d="M12 8v6M9 11h6" strokeWidth="2" />
  <path d="M4 6l2-3h12l2 3" />
</>);

const IcoPlane = ico(<>
  <path d="M3 12l4-1 5-7 1.5 1-2.5 7 5-1 2-3 1.5.8-1.5 3.7 1.5 1.2 2 .8L20 16l-7 1.5 2.5 4-1.5 1-4-4-5 1.5L3 17l4-3" />
</>);

const IcoBuilding = ico(<>
  <rect x="5" y="3" width="14" height="18" rx="1" />
  <path d="M9 7h2M13 7h2M9 11h2M13 11h2M9 15h2M13 15h2" />
  <path d="M10 21v-3h4v3" />
</>);

const IcoBriefcase = ico(<>
  <rect x="3" y="7" width="18" height="13" rx="1.5" />
  <path d="M9 7V5a1 1 0 011-1h4a1 1 0 011 1v2" />
  <path d="M3 13h18" />
</>);

const IcoCampus = ico(<>
  <path d="M3 21V10l9-5 9 5v11" />
  <rect x="9" y="14" width="6" height="7" />
  <path d="M7 14v7M17 14v7" />
  <circle cx="12" cy="9" r="1" fill="currentColor" />
</>);

const IcoTower = ico(<>
  <path d="M12 3v18" strokeWidth="2" />
  <path d="M8 7l8 0M9 11l6 0M10 15l4 0" />
  <path d="M12 3l-3-1M12 3l3-1" />
  <circle cx="12" cy="2" r="1" fill="currentColor" />
  <path d="M6 21h12" />
</>);

// === Service icons ===
const IcoMapPin = ico(<>
  <path d="M12 21s-7-6.5-7-12a7 7 0 0114 0c0 5.5-7 12-7 12z" />
  <circle cx="12" cy="9" r="2.5" />
</>);

const IcoBlueprint = ico(<>
  <rect x="3" y="4" width="18" height="16" rx="1.5" />
  <path d="M3 9h18M9 4v16" />
  <path d="M13 13h5M13 16h3" />
</>);

const IcoCog = ico(<>
  <circle cx="12" cy="12" r="3" />
  <path d="M12 2v3M12 19v3M4.93 4.93l2.12 2.12M16.95 16.95l2.12 2.12M2 12h3M19 12h3M4.93 19.07l2.12-2.12M16.95 7.05l2.12-2.12" />
</>);

const IcoFiveG = ({ size = 24, ...props }) => (
  <svg width={size} height={size} viewBox="0 0 24 24" {...props}>
    <text x="12" y="17" textAnchor="middle"
      fontFamily="Poppins, sans-serif"
      fontSize="11" fontWeight="700"
      fill="currentColor"
    >5G</text>
    <rect x="2" y="3" width="20" height="18" rx="3"
      fill="none" stroke="currentColor" strokeWidth="1.6"
    />
  </svg>
);

const IcoShare = ico(<>
  <circle cx="6" cy="12" r="2.5" />
  <circle cx="18" cy="6" r="2.5" />
  <circle cx="18" cy="18" r="2.5" />
  <path d="M8 11l8-4M8 13l8 4" />
</>);

const IcoWifi = ico(<>
  <path d="M2 8.5a14 14 0 0120 0" />
  <path d="M5 12a10 10 0 0114 0" />
  <path d="M8.5 15.5a6 6 0 017 0" />
  <circle cx="12" cy="19" r="1" fill="currentColor" stroke="none" />
</>);

const IcoSignal = ico(<>
  <path d="M3 19V12M9 19V8M15 19V14M21 19V4" strokeWidth="2.2" />
</>);

const IcoBrain = ico(<>
  <path d="M9 4a3 3 0 00-3 3v0a2 2 0 00-2 2v2a2 2 0 001 1.7V14a3 3 0 003 3v3" />
  <path d="M15 4a3 3 0 013 3v0a2 2 0 012 2v2a2 2 0 01-1 1.7V14a3 3 0 01-3 3v3" />
  <path d="M9 4a2 2 0 014 0 2 2 0 012 0" />
  <path d="M9 11h6M11 8v8" />
</>);

const IcoShield = ico(<>
  <path d="M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6l8-3z" />
  <path d="M9 12l2 2 4-4" />
</>);

// === Misc icons ===
const IcoArrowRight = ico(<>
  <path d="M5 12h14M13 5l7 7-7 7" />
</>);

const IcoCheck = ico(<>
  <path d="M5 12l5 5L20 7" strokeWidth="2.2" />
</>);

const IcoMail = ico(<>
  <rect x="3" y="5" width="18" height="14" rx="1.5" />
  <path d="M3 7l9 6 9-6" />
</>);

const IcoPhone = ico(<>
  <path d="M5 4h3l2 5-2.5 1.5a11 11 0 005 5L14 13l5 2v3a2 2 0 01-2 2A15 15 0 013 6a2 2 0 012-2z" />
</>);

const IcoLocation = IcoMapPin;

const IcoLinkedIn = ico(<>
  <rect x="3" y="3" width="18" height="18" rx="2" />
  <circle cx="7.5" cy="8" r="1" fill="currentColor" stroke="none" />
  <path d="M7.5 11v6M12 17v-4a2 2 0 014 0v4M12 11v6" />
</>);

const IcoX = ico(<>
  <path d="M4 4l16 16M20 4L4 20" />
</>);

const IcoMenu = ico(<>
  <path d="M4 7h16M4 12h16M4 17h16" />
</>);

const IcoSparkle = ico(<>
  <path d="M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8L12 3z" />
  <path d="M19 17l.7 2 2 .7-2 .7-.7 2-.7-2-2-.7 2-.7z" />
</>);

const IcoMonitor = ico(<>
  <rect x="2" y="4" width="20" height="13" rx="1.5" />
  <path d="M8 21h8M12 17v4" />
  <path d="M6 8h6M6 11h4" />
</>);

const IcoPulse = ico(<>
  <path d="M3 12h4l2-6 4 12 2-6h6" strokeWidth="2" />
</>);

const IcoNetwork = ico(<>
  <circle cx="12" cy="5" r="2" />
  <circle cx="5" cy="19" r="2" />
  <circle cx="19" cy="19" r="2" />
  <path d="M12 7v4M12 11l-5.5 6M12 11l5.5 6" />
</>);

Object.assign(window, {
  IcoHospital, IcoPlane, IcoBuilding, IcoBriefcase, IcoCampus, IcoTower,
  IcoMapPin, IcoBlueprint, IcoCog, IcoFiveG, IcoShare, IcoWifi, IcoSignal, IcoBrain, IcoShield,
  IcoArrowRight, IcoCheck, IcoMail, IcoPhone, IcoLocation,
  IcoLinkedIn, IcoX, IcoMenu, IcoSparkle, IcoMonitor, IcoPulse, IcoNetwork
});
