/* global React */
function Icon({ name, size = 22, stroke = 1.7 }) {
  const p = {
    key: <><circle cx="9" cy="12" r="5"/><circle cx="9" cy="12" r="1.6"/><path d="M14 12h7M18 12v3M21 12v3"/></>,
    wifi: <><path d="M2 9a16 16 0 0 1 20 0"/><path d="M5 13a11 11 0 0 1 14 0"/><path d="M8.5 16.5a6 6 0 0 1 7 0"/><circle cx="12" cy="20" r="1"/></>,
    coffee: <><path d="M4 8h14v6a4 4 0 0 1-4 4H8a4 4 0 0 1-4-4V8z"/><path d="M18 10h2a2 2 0 0 1 0 4h-2"/><path d="M7 2v3M11 2v3M15 2v3"/></>,
    bed: <><path d="M3 18v-6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v6"/><path d="M3 14h18M3 18v3M21 18v3"/><circle cx="8" cy="12" r="1.4"/></>,
    bath: <><path d="M3 11h18v5a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3v-5z"/><path d="M6 11V6a2 2 0 0 1 4 0"/><path d="M5 19v2M19 19v2"/></>,
    parking: <><rect x="4" y="4" width="16" height="16" rx="2"/><path d="M9 16V8h4a3 3 0 0 1 0 6H9"/></>,
    thermo: <><path d="M12 3a2 2 0 0 0-2 2v10a4 4 0 1 0 4 0V5a2 2 0 0 0-2-2z"/><circle cx="12" cy="17" r="2"/></>,
    tv: <><rect x="3" y="5" width="18" height="12" rx="2"/><path d="M8 21h8M12 17v4"/></>,
    wash: <><rect x="4" y="3" width="16" height="18" rx="2"/><circle cx="12" cy="13" r="4"/><circle cx="8" cy="6" r=".5"/></>,
    leaf: <><path d="M20 4c0 9-7 16-16 16 0-9 7-16 16-16z"/><path d="M4 20 14 10"/></>,
    no: <><circle cx="12" cy="12" r="9"/><path d="m5 5 14 14"/></>,
    map: <><path d="M3 6v14l6-3 6 3 6-3V3l-6 3-6-3-6 3z"/><path d="M9 3v14M15 6v14"/></>,
    bike: <><circle cx="6" cy="16" r="4"/><circle cx="18" cy="16" r="4"/><path d="M6 16 10 6h3l5 10M10 6l3 0"/></>,
    bus: <><rect x="4" y="4" width="16" height="13" rx="2"/><path d="M4 11h16M7 20v-3M17 20v-3"/><circle cx="8" cy="14" r=".8"/><circle cx="16" cy="14" r=".8"/></>,
    walk: <><circle cx="13" cy="4" r="2"/><path d="m9 20 3-6 3 3v3M12 14l-3-3 3-3h3l3 3"/></>,
    arrow: <><path d="M5 12h14M13 6l6 6-6 6"/></>,
    check: <><path d="m5 12 5 5 9-10"/></>,
    x: <><path d="M6 6l12 12M18 6 6 18"/></>,
    moon: <><path d="M20 14a8 8 0 0 1-10-10 8 8 0 1 0 10 10z"/></>,
    camera: <><path d="M4 8h4l2-3h4l2 3h4v12H4z"/><circle cx="12" cy="13" r="4"/></>,
    sound: <><path d="M4 10v4h4l5 4V6L8 10H4z"/><path d="M16 8a5 5 0 0 1 0 8"/></>,
    sun: <><circle cx="12" cy="12" r="4"/><path d="M12 3v2M12 19v2M3 12h2M19 12h2M5 5l1.4 1.4M17.6 17.6 19 19M5 19l1.4-1.4M17.6 6.4 19 5"/></>,
    shield: <><path d="M12 3 4 6v6c0 5 3.5 8 8 9 4.5-1 8-4 8-9V6l-8-3z"/></>,
    book: <><path d="M4 5a2 2 0 0 1 2-2h12v18H6a2 2 0 0 0-2 2V5z"/><path d="M8 3v17"/></>,
    iron: <><path d="M4 17h16l-2-6a5 5 0 0 0-5-4H9z"/><path d="M8 17v2h12v-2"/></>,
    dryer: <><rect x="4" y="3" width="16" height="18" rx="2"/><path d="M9 9a4 4 0 0 1 6 4M15 15a4 4 0 0 1-6-4"/></>,
    hairdryer: <><path d="M3 10a5 5 0 0 1 5-5h7l5-3v16l-5-3H8a5 5 0 0 1-5-5z"/><path d="M10 15v5"/></>,
    plug: <><path d="M9 3v5M15 3v5"/><path d="M6 8h12v4a6 6 0 1 1-12 0V8z"/><path d="M12 18v3"/></>,
    hanger: <><path d="M12 7a2 2 0 1 1 2-2"/><path d="M12 7v2M3 19l9-7 9 7z"/></>,
    euro: <><path d="M17 6a7 7 0 1 0 0 12M4 10h10M4 14h10"/></>,
    bag: <><path d="M6 8h12l-1 12H7L6 8z"/><path d="M9 8a3 3 0 0 1 6 0"/></>,
    pin: <><path d="M12 21s7-7 7-12a7 7 0 1 0-14 0c0 5 7 12 7 12z"/><circle cx="12" cy="9" r="2.5"/></>,
    bike: <><circle cx="5.5" cy="17.5" r="3.2"/><circle cx="18.5" cy="17.5" r="3.2"/><path d="M5.5 17.5l4-8.5h4.5M9.5 9h3.5l3.5 8.5M12 9l3 6"/></>,
    mail: <><rect x="3" y="5" width="18" height="14" rx="2"/><path d="m3 7 9 6 9-6"/></>,
    phone: <><path d="M5 4h3l2 5-2.5 1.5a11 11 0 0 0 6 6L15 14l5 2v3a2 2 0 0 1-2 2A15 15 0 0 1 3 6a2 2 0 0 1 2-2z"/></>,
    whatsapp: <><path d="M4 20l1.6-4.4A8 8 0 1 1 8.5 18.5L4 20z"/><path d="M9 9c0 4 3 7 7 7M9 9c0 0 .5-1.5 1.5-1.5S12 8 12.5 9s-1 2-1 2M16 16c0 0 1.5-.5 1.5-1.5S16 13 15 12.5s-2 1-2 1"/></>,
    instagram: <><rect x="3" y="3" width="18" height="18" rx="5"/><circle cx="12" cy="12" r="4"/><circle cx="17.5" cy="6.5" r=".8" fill="currentColor"/></>,
    pinterest: <><circle cx="12" cy="12" r="9"/><path d="M11.5 7.5a3.5 3.5 0 1 1 2 6.5c-1.2 0-2-.6-2-.6L10 21"/></>,
  };
  return (
    <svg width={size} height={size} viewBox="0 0 24 24" fill="none"
         stroke="currentColor" strokeWidth={stroke} strokeLinecap="round" strokeLinejoin="round">
      {p[name]}
    </svg>
  );
}
window.Icon = Icon;
