(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8158],{44132:function(e,l,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/comparison/[country]/[product]",function(){return o(29846)}])},29846:function(e,l,o){"use strict";o.r(l),o.d(l,{__N_SSG:function(){return S}});var r=o(85893),a=o(67294),c=o(10682),n=o(11163),t=o(39317),s=o(74944),u=o(15639),i=o(44115),p=o(37506),d=o.n(p),_=o(21279),f=o(82076),m=o(25539),E=o.n(m),h=o(40794),x=o(72399),A=o.n(x),y=o(3551),j=o(60348),S=!0;l.default=e=>{let l=(0,n.useRouter)(),[o,p]=a.useState(null),[m,x]=a.useState(null),[S,N]=a.useState(null),[T,b]=a.useState(""),[C,v]=a.useState(0),[k,F]=a.useState(null),[O,P]=a.useState(null),[I,Z]=a.useState(null);function g(){if("japan"===e.country)return"TSE | TYO - ";if("us"===e.country)return"NYSE | NASDAQ - ";if("canada"===e.country)return"TSE - ";if("brazil"===e.country)return"IBOVESPA - ";if("india"===e.country)return"BSE | NSE - ";if("australia"===e.country)return"ASX - ";if("london"===e.country)return"LSE - ";else if("europe"===e.country)return"EURONEXT - ";else if("china"===e.country)return"SSE - ";else return""}if(a.useEffect(()=>{"us"===e.country?(F("EUA"),Z(t[l.locale+"||pais_us"])):"japan"===e.country?(F("JAPAO"),Z(t[l.locale+"||pais_ja"])):"canada"===e.country?(F("CANADA"),Z(t[l.locale+"||pais_ca"])):"india"===e.country?(F("INDIA"),Z(t[l.locale+"||pais_in"])):"australia"===e.country?(F("AUSTRALIA"),Z(t[l.locale+"||pais_au"])):"china"===e.country?(F("CHINA"),Z(t[l.locale+"||pais_ch"])):"europe"===e.country?(F("EUROPE"),Z(t[l.locale+"||pais_europa"])):"london"===e.country?(F("LONDRES"),Z(t[l.locale+"||pais_londres"])):"brazil"===e.country?(F("BRASIL"),Z(t[l.locale+"||pais_br"])):"crypto"===e.country&&F("CRIPTO"),"stocks"===e.product?P(t[l.locale+"||stock"].charAt(0).toUpperCase()+t[l.locale+"||stock"].slice(1)):"etf"===e.product?P("ETF"):"reits"===e.product&&P("REITs")},[]),O)return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.Z,{level:"2",title:g()+t[l.locale+"||comparison_h1"].replaceAll("ETF",O),description:g()+t[l.locale+"||comparison_p1"].replaceAll("ETF",O).replace("ss ","s ").replace("ss.","s."),id_wp_post:25,path:l.pathname.replace("[country]",e.country).replace("[product]",e.product)}),(0,r.jsx)(u.Z,{paginaAtual:g()+t[l.locale+"||comparison_h1"].replaceAll("ETF",O)+" ( "+I+" )"}),(0,r.jsxs)("div",{className:A().container,children:[(0,r.jsx)("div",{className:A().itemPost,children:(0,r.jsxs)(c.Z,{children:[(0,r.jsx)("h1",{className:E().h1,children:g()+t[l.locale+"||comparison_h1"].replaceAll("ETF",O)}),(0,r.jsx)("p",{children:t[l.locale+"||comparison_p1"].replaceAll("ETF",O).replace("ss ","s ").replace("ss.","s.")}),(0,r.jsx)("p",{children:t[l.locale+"||comparison_p2"].replaceAll("ETF",O).replaceAll("ss ","s ").replaceAll("ss.","s.")}),(0,r.jsx)(j.Z,{}),(0,r.jsx)("p",{children:t[l.locale+"||comparison_p3"].replaceAll("ETF",O).replace("ss,","s,").replaceAll("ss ","s ")}),e.country&&(0,r.jsx)(i.Z,{country:e.country.toUpperCase(),funcionalidade:e.product,id:"inputPortfolio_"+e.product,page:"comparador",placeHolderText:t[l.locale+"||search"]}),(0,r.jsx)("button",{className:d().button,onClick:function(o){o.preventDefault();let r=document.getElementById("inputPortfolio_"+e.product);var a=r.value.split(" - ")[2];if(console.log(a),x(!1),""===r.value){N(t[l.locale+"||comparison_error1"]);return}N(null),-1===T.indexOf(a)?(b(T+a+"|"),console.log(T),v(C+1)):N(t[l.locale+"||comparison_error2"])},children:t[l.locale+"||comparison_btn1"].replaceAll("ETF",O)}),(0,r.jsx)(_.Z,{listaProdutos:T}),C>0?(0,r.jsxs)("div",{id:"divBotoesComparacao",children:[(0,r.jsx)("button",{className:d().button,onClick:function(e){e.preventDefault(),b(""),v(0),x(!1),N(null)},children:t[l.locale+"||comparison_btn2"]}),(0,r.jsx)("button",{className:d().button,onClick:()=>{!function(){if(C>0)x(!m),x(!m);else if(1===C){N("Necess\xe1rio no m\xednimo 2 produtos para compara\xe7\xe3o");return}p(T),x(!0)}()},children:t[l.locale+"||comparison_btn3"]})]}):null,m&&(0,r.jsx)(f.Z,{acoesComparacao:o,tipo:e.product.toUpperCase()+"_"+k}),S&&(0,r.jsx)(h.Z,{type:"error",message:S}),(0,r.jsx)("br",{}),(0,r.jsx)("hr",{})]})}),(0,r.jsx)("div",{className:A().itemCategorias,children:(0,r.jsx)(y.Z,{})})]})]})}}},function(e){e.O(0,[3777,2196,3592,2950,716,194,1694,9774,2888,179],function(){return e(e.s=44132)}),_N_E=e.O()}]);