/* global window, React */
// Tiny inline SVG icon set. Stroke-based, currentColor.
const I = (paths, opts = {}) => (props) => {
  const { size = 16, ...rest } = props || {};
  return React.createElement(
    "svg",
    {
      width: size, height: size, viewBox: "0 0 24 24",
      fill: "none", stroke: "currentColor",
      strokeWidth: opts.strokeWidth || 1.6,
      strokeLinecap: "round", strokeLinejoin: "round",
      ...rest,
    },
    paths
  );
};

const p = (d) => React.createElement("path", { d, key: d });
const c = (cx, cy, r) => React.createElement("circle", { cx, cy, r, key: `c${cx}${cy}${r}` });
const l = (x1, y1, x2, y2) => React.createElement("line", { x1, y1, x2, y2, key: `l${x1}${y1}${x2}${y2}` });

const Icons = {
  Search:    I([c(11,11,7), p("M20 20l-3.5-3.5")]),
  Filter:    I([p("M3 5h18"), p("M6 12h12"), p("M10 19h4")]),
  Plus:      I([p("M12 5v14"), p("M5 12h14")]),
  Minus:     I([p("M5 12h14")]),
  Fit:       I([p("M4 9V4h5"), p("M20 9V4h-5"), p("M4 15v5h5"), p("M20 15v5h-5")]),
  Close:     I([p("M6 6l12 12"), p("M18 6L6 18")]),
  ChevL:     I([p("M15 6l-6 6 6 6")]),
  ChevR:     I([p("M9 6l6 6-6 6")]),
  ChevD:     I([p("M6 9l6 6 6-6")]),
  Sun:       I([c(12,12,4), p("M12 2v2"), p("M12 20v2"), p("M4 12H2"), p("M22 12h-2"), p("M5 5l1.5 1.5"), p("M17.5 17.5L19 19"), p("M5 19l1.5-1.5"), p("M17.5 6.5L19 5")]),
  Moon:      I([p("M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z")]),
  Schema:    I([c(5,5,2), c(19,5,2), c(12,19,2), p("M5 7v3a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7"), p("M12 12v5")]),
  Question:  I([c(12,12,9), p("M9.5 9a2.5 2.5 0 1 1 3.5 2.3c-.7.4-1 .9-1 1.7"), p("M12 17h0")]),
  Code:      I([p("M8 8l-4 4 4 4"), p("M16 8l4 4-4 4"), p("M14 5l-4 14")]),
  Layers:    I([p("M12 3l9 5-9 5-9-5 9-5z"), p("M3 13l9 5 9-5"), p("M3 18l9 5 9-5")]),
  Sparkle:   I([p("M12 4l1.5 4 4 1.5-4 1.5L12 15l-1.5-4-4-1.5 4-1.5L12 4z"), p("M19 14l.7 1.8 1.8.7-1.8.7-.7 1.8-.7-1.8-1.8-.7 1.8-.7.7-1.8z")]),
  Github:    I([p("M9 19c-4 1.5-4-2-6-2"), p("M15 22v-4a3 3 0 0 0-1-2.5c3-.4 6-2 6-7a5.5 5.5 0 0 0-1.5-3.7 5 5 0 0 0-.1-3.7s-1.2-.4-4 1.5a13 13 0 0 0-7 0c-2.8-1.9-4-1.5-4-1.5a5 5 0 0 0-.1 3.7A5.5 5.5 0 0 0 3 8.5c0 5 3 6.6 6 7A3 3 0 0 0 8 18v4")]),
  Doc:       I([p("M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"), p("M14 3v6h6"), p("M9 13h6"), p("M9 17h4")]),
  Copy:      I([p("M9 9h10v10H9z"), p("M5 15V5h10")]),
  Play:      I([p("M6 4l14 8-14 8V4z")]),
  Beaker:    I([p("M9 3v6L4 19a1 1 0 0 0 1 1.5h14A1 1 0 0 0 20 19l-5-10V3"), p("M8 3h8")]),
  Building:  I([p("M4 21V7a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v14"), p("M9 9h2"), p("M13 9h2"), p("M9 13h2"), p("M13 13h2"), p("M9 17h6")]),
  Pulse:     I([p("M3 12h4l2-6 4 12 2-6h6")]),
  Compass:   I([c(12,12,9), p("M15.5 8.5l-2 5-5 2 2-5 5-2z")]),
  Bell:      I([p("M6 8a6 6 0 0 1 12 0c0 7 3 8 3 8H3s3-1 3-8"), p("M10 21a2 2 0 0 0 4 0")]),
};

window.Icons = Icons;
