/* Rankabiz - simple geometric stroke icons */
(function () {
  const S = (p) => ({
    width: p.size || 24,
    height: p.size || 24,
    viewBox: "0 0 24 24",
    fill: "none",
    stroke: "currentColor",
    strokeWidth: p.sw || 2,
    strokeLinecap: "round",
    strokeLinejoin: "round",
  });
  const e = React.createElement;

  const Icons = {
    // Target / Google Ads local
    target: (p = {}) => e("svg", S(p),
      e("circle", { cx: 12, cy: 12, r: 9 }),
      e("circle", { cx: 12, cy: 12, r: 4.5 }),
      e("circle", { cx: 12, cy: 12, r: 0.6, fill: "currentColor" })
    ),
    // Map pin / GMB
    pin: (p = {}) => e("svg", S(p),
      e("path", { d: "M12 21c4.5-5 7-8 7-11a7 7 0 1 0-14 0c0 3 2.5 6 7 11Z" }),
      e("circle", { cx: 12, cy: 10, r: 2.6 })
    ),
    // Magnifier / SEO
    search: (p = {}) => e("svg", S(p),
      e("circle", { cx: 11, cy: 11, r: 7 }),
      e("path", { d: "m20 20-3.2-3.2" })
    ),
    check: (p = {}) => e("svg", S(p),
      e("path", { d: "m4 12.5 5 5L20 6" })
    ),
    arrow: (p = {}) => e("svg", S(p),
      e("path", { d: "M5 12h14" }),
      e("path", { d: "m13 6 6 6-6 6" })
    ),
    plus: (p = {}) => e("svg", S(p),
      e("path", { d: "M12 5v14M5 12h14" })
    ),
    chevron: (p = {}) => e("svg", S(p),
      e("path", { d: "m6 9 6 6 6-6" })
    ),
    globe: (p = {}) => e("svg", S(p),
      e("circle", { cx: 12, cy: 12, r: 9 }),
      e("path", { d: "M3 12h18M12 3c2.6 2.5 4 5.7 4 9s-1.4 6.5-4 9c-2.6-2.5-4-5.7-4-9s1.4-6.5 4-9Z" })
    ),
    calendar: (p = {}) => e("svg", S(p),
      e("rect", { x: 4, y: 5, width: 16, height: 16, rx: 2.5 }),
      e("path", { d: "M4 9.5h16M8 3v4M16 3v4" })
    ),
    phone: (p = {}) => e("svg", S(p),
      e("path", { d: "M6.5 4h3l1.5 4-2 1.5a11 11 0 0 0 5 5l1.5-2 4 1.5v3a2 2 0 0 1-2 2A16 16 0 0 1 4.5 6a2 2 0 0 1 2-2Z" })
    ),
    star: (p = {}) => e("svg", S(p),
      e("path", { d: "m12 3 2.6 5.6 6.1.7-4.5 4.1 1.2 6L12 16.9 6.6 19.5l1.2-6L3.3 9.3l6.1-.7Z" })
    ),
    bolt: (p = {}) => e("svg", S(p),
      e("path", { d: "M13 3 5 13h6l-1 8 8-10h-6l1-8Z" })
    ),
    chart: (p = {}) => e("svg", S(p),
      e("path", { d: "M4 20V4M4 20h16" }),
      e("path", { d: "M8 16v-3M12 16V8M16 16v-6" })
    ),
    shield: (p = {}) => e("svg", S(p),
      e("path", { d: "M12 3 5 6v5c0 4.5 3 8 7 10 4-2 7-5.5 7-10V6l-7-3Z" }),
      e("path", { d: "m9 12 2 2 4-4" })
    ),
    map: (p = {}) => e("svg", S(p),
      e("path", { d: "M9 4 3 6v14l6-2 6 2 6-2V4l-6 2-6-2Z" }),
      e("path", { d: "M9 4v14M15 6v14" })
    ),
  };

  window.RankIcon = function RankIcon({ name, size, sw, ...rest }) {
    const fn = Icons[name];
    if (!fn) return null;
    return e("span", { className: "ricon", style: { display: "inline-flex", ...rest.style }, ...rest }, fn({ size, sw }));
  };
})();
