(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[538],{12756:function(t){function n(t){var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}n.keys=function(){return[]},n.resolve=n,n.id=12756,t.exports=n},42424:function(t){function n(t){var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}n.keys=function(){return[]},n.resolve=n,n.id=42424,t.exports=n},32964:function(t,n,e){"use strict";var o,r=e(71383),c=e(11720),i=e(32059),u=e(94935),a=e(14990),s=e(9966),p=e(34124),l=e(58372),d=e(53658),f=e(37130),_=e.n(f),m=e(97997);const v=(t,n)=>{let{tpl:e}=n;return e(o||(o=(0,r.Z)(["\n",";\n\n",";\n\nconst "," = (",") => (\n  ","\n);\n\n",";\n"])),t.imports,t.interfaces,t.componentName,t.props,t.jsx,t.exports)};n.Z=t=>{const{0:n,1:e}=(0,c.useState)(""),o=async()=>{try{const n=i.vs.sync(t.svgText.replace(/<!\[CDATA\[(.|\n)*\]>/g,""),{native:t.native,svgo:!1,template:v,typescript:t.toggleOptions.typescript},{componentName:"SVGComponent"}),o=await(0,u.WU)(n,{parser:"babel-ts",plugins:[a.Z,s.ZP],semi:!t.toggleOptions.semicolons,jsxSingleQuote:t.toggleOptions.singlequotes});e(o)}catch(n){console.log(n),e("")}},{shouldDownload:r,downloadFile:f}=t;return(0,c.useEffect)((()=>{o(),r&&f(n)}),[r,f,t.svgText]),(0,c.useEffect)((()=>{o()}),[t.toggleOptions]),(0,m.BX)("div",{className:_().outputReact,children:[(0,m.tZ)("div",{className:_().codemirrorContainer,children:(0,m.tZ)(p.Z,{mode:"jsx",value:n,readOnly:!0})}),(0,m.BX)("div",{className:_().outputReactFooter,children:[(0,m.tZ)(l.Z,{handleCopyButton:()=>{navigator.clipboard.writeText(n)},react:!0}),(0,m.tZ)(d.Z,{onClickDownload:t.onClickDownload,format:"JSX"})]})]})}},76841:function(t,n,e){"use strict";e.r(n);e(11720);var o=e(21111),r=e(73319),c=e(9008),i=e.n(c),u=e(44250),a=e(32964),s=e(97997);n.default=()=>(0,s.BX)(r.Z,{name:"Homepage",children:[(0,s.BX)(i(),{children:[(0,s.tZ)("title",{children:"Convert SVG to React JSX - SVG Viewer"}),(0,s.tZ)("meta",{name:"description",content:"Convert SVG to React JSX online."})]}),(0,s.tZ)(o.Z,{isValid:!0,outputType:u.Z.react,OutputComponent:a.Z})]})},75267:function(t,n,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/svg-to-react-jsx",function(){return e(76841)}])},37130:function(t){t.exports={outputReact:"output-type-react_outputReact__Fe9AY",outputReactFooter:"output-type-react_outputReactFooter__YvEAK",codemirrorContainer:"output-type-react_codemirrorContainer__teDSz"}},33770:function(){},72950:function(){},33947:function(){},48720:function(){},11504:function(){},9616:function(){}},function(t){t.O(0,[762,797,724,28,966,889,69,271,774,888,179],(function(){return n=75267,t(t.s=n);var n}));var n=t.O();_N_E=n}]);