/* global React */
// FitMyRecipe — icon set. Thin, rounded line icons (lucide-style) + store glyphs.
(function(){
const { createElement: h } = React;

function Svg(props){
  const { children, size=24, stroke=2, fill="none", ...rest } = props;
  return h('svg', {
    width:size, height:size, viewBox:'0 0 24 24', fill,
    stroke:'currentColor', strokeWidth:stroke, strokeLinecap:'round', strokeLinejoin:'round',
    ...rest
  }, children);
}
const P = (d, extra) => h('path', { d, ...(extra||{}) });

const Icon = {
  link:    (p)=>h(Svg,p, P('M10 13a5 5 0 0 0 7.5.5l3-3a5 5 0 0 0-7-7l-1.5 1.5'), P('M14 11a5 5 0 0 0-7.5-.5l-3 3a5 5 0 0 0 7 7L12 19')),
  image:   (p)=>h(Svg,p, h('rect',{x:3,y:3,width:18,height:18,rx:3}), h('circle',{cx:8.5,cy:8.5,r:1.6}), P('M21 15l-5-5L5 21')),
  camera:  (p)=>h(Svg,p, P('M4 8h3l1.5-2h7L17 8h3a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1z'), h('circle',{cx:12,cy:13,r:3.3})),
  wand:    (p)=>h(Svg,p, P('M15 4V2M15 10V8M11.5 6.5H13M17 6.5h1.5'), P('M3 21l11-11 2 2L5 23z M14 8l2 2', {strokeWidth:0,fill:'none'}), P('M5 21L16 10l-2-2L3 19z'), P('M18 14l.6 1.6L20 16l-1.4.4L18 18l-.6-1.6L16 16l1.4-.4z',{fill:'currentColor',stroke:'none'})),
  flame:   (p)=>h(Svg,p, P('M12 3c1 3-1 4-1.5 6 1 0 2-1 2.5-2 2 1.5 3 3.5 3 6a5.5 5.5 0 1 1-11 0c0-2 1-3.5 2-4.5.3 1 1 1.5 1.8 1.5C8 8.5 9.5 5.5 12 3z')),
  clock:   (p)=>h(Svg,p, h('circle',{cx:12,cy:12,r:9}), P('M12 7v5l3.5 2')),
  users:   (p)=>h(Svg,p, h('circle',{cx:9,cy:8,r:3.4}), P('M3.5 20a5.5 5.5 0 0 1 11 0'), P('M16 5.2a3.4 3.4 0 0 1 0 5.6M17.5 20a5.5 5.5 0 0 0-3-4.9')),
  arrowR:  (p)=>h(Svg,p, P('M5 12h14M13 6l6 6-6 6')),
  check:   (p)=>h(Svg,p, P('M5 12.5l4.5 4.5L19 7')),
  crown:   (p)=>h(Svg,p, P('M4 18h16M3 7l4.5 4L12 5l4.5 6L21 7l-1.5 9H4.5z')),
  shield:  (p)=>h(Svg,p, P('M12 3l7 3v5c0 5-3.2 8-7 9-3.8-1-7-4-7-9V6z'), P('M9 12l2 2 4-4')),
  star:    (p)=>h(Svg,{...p,fill:'currentColor',stroke:'none'}, P('M12 2.5l2.7 5.9 6.3.6-4.8 4.2 1.5 6.3L12 16.9 6.3 19.5l1.5-6.3L3 9l6.3-.6z')),
  leaf:    (p)=>h(Svg,p, P('M5 19c0-8 6-13 15-13 0 9-5 14-13 14-1.4 0-2-.4-2-1z'), P('M5 19c3-4 6-6 9-7')),
  trendUp: (p)=>h(Svg,p, P('M3 17l6-6 4 4 8-8'), P('M16 7h5v5')),
  gauge:   (p)=>h(Svg,p, P('M12 13l4-4'), h('circle',{cx:12,cy:13,r:8}), P('M5 18a8 8 0 1 1 14 0')),
  refresh: (p)=>h(Svg,p, P('M21 12a9 9 0 1 1-3-6.7L21 7'), P('M21 3v4h-4')),
  scale:   (p)=>h(Svg,p, P('M12 3v18M6 7h12'), P('M6 7l-3 6a3 3 0 0 0 6 0zM18 7l-3 6a3 3 0 0 0 6 0z')),
  bolt:    (p)=>h(Svg,p, P('M13 2L4 14h7l-1 8 9-12h-7z',{fill:'currentColor',stroke:'none'})),
  bookmark:(p)=>h(Svg,p, P('M6 3h12v18l-6-4-6 4z')),
  arrowL:  (p)=>h(Svg,p, P('M19 12H5M11 6l-6 6 6 6')),
  book:    (p)=>h(Svg,p, P('M4 5a2 2 0 0 1 2-2h12v16H6a2 2 0 0 0-2 2z'), P('M4 19a2 2 0 0 0 2 2h12'), P('M9 7h6M9 11h6')),
  flask:   (p)=>h(Svg,p, P('M9 3h6M10 3v6.5L4.8 18a2 2 0 0 0 1.7 3h11a2 2 0 0 0 1.7-3L14 9.5V3'), P('M7.5 14h9')),
  atom:    (p)=>h(Svg,p, h('circle',{cx:12,cy:12,r:1.4,fill:'currentColor',stroke:'none'}), h('ellipse',{cx:12,cy:12,rx:9,ry:3.6}), h('ellipse',{cx:12,cy:12,rx:9,ry:3.6,transform:'rotate(60 12 12)'}), h('ellipse',{cx:12,cy:12,rx:9,ry:3.6,transform:'rotate(120 12 12)'})),
  thermo:  (p)=>h(Svg,p, P('M14 14.8V5a2 2 0 0 0-4 0v9.8a4 4 0 1 0 4 0z')),
  sparkle: (p)=>h(Svg,p, P('M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8z',{fill:'currentColor',stroke:'none'})),
  // store glyphs
  apple:   (p)=>h(Svg,{...p,fill:'currentColor',stroke:'none'}, P('M16.4 12.7c0-2.1 1.7-3.1 1.8-3.2-1-1.4-2.5-1.6-3-1.6-1.3-.1-2.5.7-3.1.7-.6 0-1.6-.7-2.7-.7-1.4 0-2.7.8-3.4 2-1.4 2.5-.4 6.2 1 8.2.7 1 1.5 2.1 2.5 2.1 1 0 1.4-.6 2.6-.6 1.2 0 1.5.6 2.6.6 1.1 0 1.8-1 2.5-2 .8-1.1 1.1-2.2 1.1-2.3-.1 0-2.1-.8-2.1-3.1zM14.5 6.2c.6-.7 1-1.6.9-2.6-.8 0-1.8.6-2.4 1.3-.5.6-1 1.5-.9 2.5.9.1 1.8-.5 2.4-1.2z')),
  play:    (p)=>h(Svg,{...p,fill:'currentColor',stroke:'none'}, P('M4 3.3v17.4c0 .6.6 1 1.1.7l14-8.7c.5-.3.5-1 0-1.4L5.1 2.6C4.6 2.3 4 2.7 4 3.3z')),
};

window.Icon = Icon;
window.SvgBase = Svg;
})();
