{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/mEM7iUqDWNB1CQ1XdWyf/wdRZfy3tRYtZwCynVzUg/SVG_Component.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{ControlType,addPropertyControls}from\"framer\";export function SVGIcon(props){const{svgCode,strokeColor,fillColor,strokeWidth,padding,size,strokeGradientType,fillGradientType,strokeGradientStart,strokeGradientEnd,fillGradientStart,fillGradientEnd}=props;const[parsedSVG,setParsedSVG]=React.useState(svgCode);const[isClient,setIsClient]=React.useState(false);React.useEffect(()=>{setIsClient(true);},[]);React.useEffect(()=>{if(!isClient)return;const parseSVG=svgString=>{const parser=new DOMParser;const doc=parser.parseFromString(svgString,\"image/svg+xml\");const svgElement=doc.getElementsByTagName(\"svg\")[0];const applyGradient=(element,type,id,startColor,endColor)=>{let gradientElement;if(type===\"linear\"){gradientElement=document.createElementNS(\"http://www.w3.org/2000/svg\",\"linearGradient\");gradientElement.setAttribute(\"id\",id);gradientElement.innerHTML=`\n                        <stop offset=\"0%\" style=\"stop-color:${startColor};stop-opacity:1\" />\n                        <stop offset=\"100%\" style=\"stop-color:${endColor};stop-opacity:1\" />\n                    `;}else{gradientElement=document.createElementNS(\"http://www.w3.org/2000/svg\",\"radialGradient\");gradientElement.setAttribute(\"id\",id);gradientElement.innerHTML=`\n                        <stop offset=\"0%\" style=\"stop-color:${startColor};stop-opacity:1\" />\n                        <stop offset=\"100%\" style=\"stop-color:${endColor};stop-opacity:1\" />\n                    `;}element.appendChild(gradientElement);};if(strokeGradientType!==\"none\"){applyGradient(svgElement,strokeGradientType,\"strokeGradient\",strokeGradientStart,strokeGradientEnd);}if(fillGradientType!==\"none\"){applyGradient(svgElement,fillGradientType,\"fillGradient\",fillGradientStart,fillGradientEnd);}const traverseAndUpdate=node=>{if(node instanceof SVGElement){if(strokeGradientType!==\"none\"){node.setAttribute(\"stroke\",\"url(#strokeGradient)\");}else{node.setAttribute(\"stroke\",strokeColor);}if(fillGradientType!==\"none\"){node.setAttribute(\"fill\",\"url(#fillGradient)\");}else{node.setAttribute(\"fill\",fillColor);}node.setAttribute(\"stroke-width\",strokeWidth.toString());for(let i=0;i<node.children.length;i++){traverseAndUpdate(node.children[i]);}}};if(svgElement){traverseAndUpdate(svgElement);}svgElement.setAttribute(\"width\",size.toString());svgElement.setAttribute(\"height\",size.toString());return doc.documentElement.outerHTML;};setParsedSVG(parseSVG(svgCode));},[isClient,svgCode,strokeColor,fillColor,strokeWidth,size,strokeGradientType,fillGradientType,strokeGradientStart,strokeGradientEnd,fillGradientStart,fillGradientEnd]);const svgStyle={padding:`${padding}px`};return /*#__PURE__*/_jsx(\"div\",{dangerouslySetInnerHTML:{__html:parsedSVG},style:svgStyle});}SVGIcon.defaultProps={svgCode:`<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 2L2 22H22L12 2Z\" stroke=\"#000000\" strokeWidth=\"2\" /></svg>`,strokeColor:\"#000000\",fillColor:\"#FFFFFF\",strokeWidth:1,padding:0,size:24,strokeGradientType:\"none\",fillGradientType:\"none\",strokeGradientStart:\"#000000\",strokeGradientEnd:\"#FFFFFF\",fillGradientStart:\"#000000\",fillGradientEnd:\"#FFFFFF\"};addPropertyControls(SVGIcon,{svgCode:{type:ControlType.String,title:\"SVG Code\"},strokeColor:{type:ControlType.Color,title:\"Stroke Color\"},fillColor:{type:ControlType.Color,title:\"Fill Color\"},strokeWidth:{type:ControlType.Number,title:\"Stroke Width\",min:0,max:10,step:1},padding:{type:ControlType.Number,title:\"Padding\",min:0,max:50,step:1},size:{type:ControlType.Number,title:\"Size\",min:1,max:128,step:1},strokeGradientType:{type:ControlType.Enum,title:\"Stroke Gradient\",options:[\"none\",\"linear\",\"radial\"],optionTitles:[\"None\",\"Linear\",\"Radial\"]},fillGradientType:{type:ControlType.Enum,title:\"Fill Gradient\",options:[\"none\",\"linear\",\"radial\"],optionTitles:[\"None\",\"Linear\",\"Radial\"]},strokeGradientStart:{type:ControlType.Color,title:\"Stroke Gradient Start\",hidden:props=>props.strokeGradientType===\"none\"},strokeGradientEnd:{type:ControlType.Color,title:\"Stroke Gradient End\",hidden:props=>props.strokeGradientType===\"none\"},fillGradientStart:{type:ControlType.Color,title:\"Fill Gradient Start\",hidden:props=>props.fillGradientType===\"none\"},fillGradientEnd:{type:ControlType.Color,title:\"Fill Gradient End\",hidden:props=>props.fillGradientType===\"none\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"SVGIcon\":{\"type\":\"reactComponent\",\"name\":\"SVGIcon\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SVG_Component.map"],
  "mappings": "uEAAkI,SAASA,EAAQC,EAAM,CAAC,GAAK,CAAC,QAAAC,EAAQ,YAAAC,EAAY,UAAAC,EAAU,YAAAC,EAAY,QAAAC,EAAQ,KAAAC,EAAK,mBAAAC,EAAmB,iBAAAC,EAAiB,oBAAAC,EAAoB,kBAAAC,EAAkB,kBAAAC,EAAkB,gBAAAC,CAAe,EAAEZ,EAAW,CAACa,EAAUC,CAAY,EAAQC,EAASd,CAAO,EAAO,CAACe,EAASC,CAAW,EAAQF,EAAS,EAAK,EAAQG,EAAU,IAAI,CAACD,EAAY,EAAI,CAAE,EAAE,CAAC,CAAC,EAAQC,EAAU,IAAI,CAAC,GAAG,CAACF,EAAS,OAMsbF,GANhaK,GAAW,CAA4B,IAAMC,EAApB,IAAI,YAA2B,gBAAgBD,EAAU,eAAe,EAAQE,EAAWD,EAAI,qBAAqB,KAAK,EAAE,CAAC,EAAQE,EAAc,CAACC,EAAQC,EAAKC,EAAGC,EAAWC,IAAW,CAAC,IAAIC,EAAmBJ,IAAO,UAAUI,EAAgB,SAAS,gBAAgB,6BAA6B,gBAAgB,EAAEA,EAAgB,aAAa,KAAKH,CAAE,EAAEG,EAAgB,UAAU;AAA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"strokeColor", "fillColor", "strokeWidth", "padding", "size", "strokeGradientType", "fillGradientType", "strokeGradientStart", "strokeGradientEnd", "fillGradientStart", "fillGradientEnd", "parsedSVG", "setParsedSVG", "ye", "isClient", "setIsClient", "ue", "svgString", "doc", "svgElement", "applyGradient", "element", "type", "id", "startColor", "endColor", "gradientElement", "traverseAndUpdate", "node", "i", "svgStyle", "p", "addPropertyControls", "ControlType"]
}
