{"version":3,"file":"SVG_Code.DXF2SSRa.mjs","names":["React.useState","React.useMemo"],"sources":["https:/framerusercontent.com/modules/YnJDFkfX2oSlaUBhpKM5/nQioBkjqDZ1AjPs5cH0u/SVG_Code.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";// fill renklerini çıkaran yardımcı fonksiyon\nconst extractFillColors=svg=>{const regex=/fill=[\"'](.*?)[\"']/gi;const colors=[];let match;while((match=regex.exec(svg))!==null){const color=match[1];if(color!==\"none\"&&!colors.includes(color)){colors.push(color);}}return colors;};// stroke renklerini çıkaran yardımcı fonksiyon\nconst extractStrokeColors=svg=>{const regex=/stroke=[\"'](.*?)[\"']/gi;const colors=[];let match;while((match=regex.exec(svg))!==null){const color=match[1];if(color!==\"none\"&&!colors.includes(color)){colors.push(color);}}return colors;};// stroke olup olmadığını kontrol eder\nconst hasStroke=svg=>{return/<path[^>]*stroke=/.test(svg);};export function SVG_Code(props){const[initialColors,setInitialColors]=React.useState({color1:\"#000000\",color2:\"#000000\",stroke:\"#000000\"});React.useEffect(()=>{const fills=extractFillColors(props.svg||\"\");const strokes=extractStrokeColors(props.svg||\"\");setInitialColors({color1:fills[0]||\"#000000\",color2:fills[1]||fills[2]||\"#000000\",stroke:strokes[0]||\"#000000\"});},[props.svg]);const processedSVG=React.useMemo(()=>{if(!props.svg)return\"\";let updated=props.svg.replace(/width=\".*?\"/g,'width=\"100%\"').replace(/height=\".*?\"/g,'height=\"100%\"');if(props.useOriginalColors)return updated;const fills=extractFillColors(props.svg);const fillCount=fills.length;if(fillCount>=1){updated=updated.replace(new RegExp(`fill=[\"']${fills[0]}[\"']`,\"g\"),`fill=\"${props.color1}\"`);}if(fillCount===2){updated=updated.replace(new RegExp(`fill=[\"']${fills[1]}[\"']`,\"g\"),`fill=\"${props.color2}\"`);}else if(fillCount===3){updated=updated.replace(new RegExp(`fill=[\"']${fills[1]}[\"']`,\"g\"),`fill=\"${props.color2}\"`);updated=updated.replace(new RegExp(`fill=[\"']${fills[2]}[\"']`,\"g\"),`fill=\"${props.color2}\"`);}if(hasStroke(updated)){updated=updated.replace(/<path([^>]*)stroke=[\"'][^\"']*[\"']/g,`<path$1stroke=\"${props.strokeColor}\"`);updated=updated.replace(/<path([^>]*)stroke-width=[\"'][^\"']*[\"']/g,`<path$1stroke-width=\"${props.strokeWidth}\"`);}return updated;},[props.svg,props.color1,props.color2,props.strokeColor,props.strokeWidth,props.useOriginalColors]);return /*#__PURE__*/_jsx(\"div\",{title:props.title,\"aria-label\":props.description,style:{width:\"100%\",height:\"100%\",padding:props.padding,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",background:\"transparent\",boxSizing:\"border-box\"},dangerouslySetInnerHTML:{__html:processedSVG}});}SVG_Code.defaultProps={width:24,height:24,color1:\"#000000\",color2:\"#000000\",strokeColor:\"#000000\",strokeWidth:1.5,padding:0,useOriginalColors:false,title:\"Icon name...\",description:\"Icon purpose...\",svg:`<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M6.22968 21.6072C5.34998 21.6072 4.49271 21.3051 3.79771 20.735C2.90414 20.0026 2.39062 18.919 2.39062 17.7627C2.39062 16.0033 3.64291 14.4755 5.36813 14.1307L8.15561 13.5734V7.34272C8.15561 5.55018 9.43138 3.99358 11.1897 3.64233L17.0785 2.46474C18.1963 2.24161 19.3418 2.52773 20.2226 3.24945C21.1033 3.97223 21.6094 5.03985 21.6094 6.17901C21.6094 7.97795 20.3293 9.53989 18.5646 9.89327L15.8444 10.4378V10.9032C15.8444 12.6958 14.5686 14.2524 12.8103 14.6036L10.0794 15.1502V17.7649C10.0794 19.5905 8.78015 21.1759 6.9898 21.5336C6.73678 21.5838 6.4827 21.6094 6.23075 21.6094L6.22968 21.6072ZM8.15668 15.5325L5.74606 16.015C4.91547 16.1816 4.31335 16.9161 4.31335 17.7627C4.31335 18.3403 4.56958 18.8827 5.0169 19.2489C5.46422 19.6151 6.04498 19.7603 6.61187 19.6471C7.50651 19.4677 8.15668 18.6755 8.15668 17.7627V15.5325ZM17.8226 4.3128C17.6999 4.3128 17.5782 4.32348 17.4554 4.34803L11.5676 5.52562C10.705 5.69858 10.0783 6.46193 10.0783 7.34165V13.188L12.4324 12.7171C13.295 12.5442 13.9217 11.7808 13.9217 10.9011V8.86088L18.1867 8.00785C19.0557 7.83382 19.6866 7.06407 19.6866 6.17794C19.6866 5.61637 19.4379 5.0911 19.0034 4.73558C18.666 4.45907 18.2497 4.3128 17.8226 4.3128Z\" fill=\"black\"/> </svg>`};addPropertyControls(SVG_Code,{svg:{type:ControlType.String,title:\"SVG Code\",displayTextArea:false},useOriginalColors:{type:ControlType.Boolean,title:\"Use Original Colors\",defaultValue:false},color1:{type:ControlType.Color,title:\"Primary Color\",defaultValue:\"#000000\",hidden(props){const fills=extractFillColors(props.svg||\"\");return props.useOriginalColors||fills.length<1||fills.length>3;}},color2:{type:ControlType.Color,title:\"Secondary Color\",defaultValue:\"#000000\",hidden(props){const fills=extractFillColors(props.svg||\"\");return props.useOriginalColors||fills.length<2||fills.length>3;}},strokeColor:{type:ControlType.Color,title:\"Stroke Color\",defaultValue:\"#000000\",hidden(props){return props.useOriginalColors||!hasStroke(props.svg||\"\");}},strokeWidth:{type:ControlType.Number,title:\"Stroke Width\",min:0,max:999999999,step:.5,defaultValue:1.5,displayStepper:true,hidden(props){return props.useOriginalColors||!hasStroke(props.svg||\"\");}},padding:{type:ControlType.Number,title:\"Padding\",min:0,max:100,step:1,displayStepper:true},title:{type:ControlType.String,title:\"Title\",placeholder:\"Icon name...\"},description:{type:ControlType.String,title:\"Description\",placeholder:\"Icon purpose...\",description:\"More components at [Flowbase](https://www.flowbase.co)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"SVG_Code\":{\"type\":\"reactComponent\",\"name\":\"SVG_Code\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__Fram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