import { splitProps } from "solid-js";
import { isServer, mergeProps, ssr } from "solid-js/web";
export const CustomIcon = (props) => IconTemplate(props.src, props);
export function IconTemplate(iconSrc, props) {
    const mergedProps = mergeProps(iconSrc.a, props);
    const [_, svgProps] = splitProps(mergedProps, ["src"]);
    return (<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">
      {isServer && ssr(iconSrc.c)}
      {props.title && <title>{props.title}</title>}
    </svg>);
}
