'use strict';

var web = require('solid-js/web');
var solidJs = require('solid-js');

const _tmpl$ = ["<title>", "</title>"];
const CustomIcon = props => IconTemplate(props.src, props);
function IconTemplate(iconSrc, props) {
  const mergedProps = web.mergeProps(iconSrc.a, props);
  const [_, svgProps] = solidJs.splitProps(mergedProps, ["src"]);
  return web.ssrElement("svg", () => ({
    "stroke": iconSrc.a?.stroke,
    "color": props.color || "currentColor",
    "fill": props.color || "currentColor",
    "stroke-width": "0",
    "style": {
      ...props.style,
      overflow: "visible"
    },
    ...svgProps,
    "height": props.size || "1em",
    "width": props.size || "1em",
    "innerHTML": iconSrc.c,
    "xmlns": "http://www.w3.org/2000/svg"
  }), [web.isServer && web.escape(web.ssr(iconSrc.c)), props.title && web.ssr(_tmpl$, web.escape(props.title))], false);
}

exports.CustomIcon = CustomIcon;
exports.IconTemplate = IconTemplate;
