1(self.webpackChunkwom=self.webpackChunkwom||[]).push([[6073],{420839:function(e,l,t){"use strict";t.r(l);var n=t(318435),a=t(870040),o=t(694211),r=t(667294),i=t(494746),c=t(229708),u=t(932911),s=t.n(u),d=t(142193),m=t(687074),p=t(135145);const v="multiProduct";l.default=({pageContext:e,data:l})=>{var t,u,f,g,h,C,E,k,b;const{getPDPLoadPage:I,getClickOnColor:y,getClickQuantity:S,getLoadProductDetail:w,getClickDetailDescription:P,getLoadBuyProccess:A,getClickContinueUserInfo:O}=(0,n.nY)(),x=(0,o.I0)(),{0:D,1:_}=(0,r.useState)(!1),N=i.dl.useHasMounted(),{isFetchingCart:T}=(0,d.jD)(),U=(0,n.JO)("sku"),{contentfulProduct:L=null,contentfulComponentJson:M=null}=l,{data:{accesoryCard:j={},ribbons:J=[]},media:V=[]}=M,$=null!==(t=null==L?void 0:L.productVariations)&&void 0!==t?t:[],{0:H,1:F}=(0,r.useState)($.length?$.find(e=>e.referenceId===U)?$.find(e=>e.referenceId===U):$[0]:null),{error:X,loading:Y,customAttributes:q,item:z}=(0,c.SV)(null==L?void 0:L.referenceId),{user:B,handleSubmitUserInfo:G,isOpenUserModal:Q,handleCloseUserModal:W,handleOpenUserModal:Z}=(0,c.L_)(),K=(0,n.As)(null==H||null===(u=H.context)||void 0===u?void 0:u.context),R=parseInt((null==K?void 0:K.price)||"0",10);let ee="";Array.isArray(null==H?void 0:H.images)&&null!=H&&null!==(f=H.images[0])&&void 0!==f&&null!==(g=f.file)&&void 0!==g&&g.url&&(ee=null==H||null===(h=H.images[0])||void 0===h||null===(C=h.file)||void 0===C?void 0:C.url);const le={sku:null==H?void 0:H.referenceId,image:ee,name:null==L?void 0:L.name,description:null==e?void 0:e.seoDescription,brandName:null==z?void 0:z.marca,availability:0===(null==z?void 0:z.qty)?"https://schema.org/OutOfStock":"https://schema.org/InStock",price:R};if((0,r.useEffect)(()=>{(0,n.cT)({sku:null==H?void 0:H.referenceId})},[H]),(0,r.useEffect)(()=>{x({type:"checkout/clear"}),_(!1)},[]),(0,r.useEffect)(()=>{try{var e;JSON.parse(null==H||null===(e=H.context)||void 0===e?void 0:e.context);I(null==L?void 0:L.name),w(L)}catch(e){}},[]),N&&(D||Y))return r.createElement(a.SX,null);if(X)return null;const te=(0,n.jj)(le);return r.createElement(r.Fragment,null,Q&&r.createElement(m.tA,{rut:null==B?void 0:B.rut,email:null==B?void 0:B.email,headerText:"Información de usuario",onClose:()=>W(),onClickNext:e=>{O(v),G(e)},onView:()=>A(v)}),r.createElement(a.HJ,{title:null==e?void 0:e.seoTitle,description:null==e?void 0:e.seoDescription,canonical:`${null!==(E=null==e?void 0:e.basePath)&&void 0!==E?E:""}${null!==(k=null==e?void 0:e.slug)&&void 0!==k?k:""}`,jsonLd:te}),!N||D||Y?r.createElement(a.SX,null):r.createElement("div",{className:s().container},r.createElement(a.Iu,null),r.createElement(a.J6,null),r.createElement(a.Oo,{items:[{label:"Inicio",to:"/accesorios"},{label:"Accesorios",to:"/accesorios"},(null==z?void 0:z.marca)&&{label:null==z?void 0:z.marca}],separator:">"}),r.createElement("div",{className:s().content_wrapper},r.createElement(a.l$,{product:L,selectedChild:H,setSelectedChild:F,magentoItem:z,handleOpenUserInfoModal:Z},r.createElement(a.Li,{magentoItem:z,selectedChild:H,accesoryCard:j,ribbons:J,pageMedia:V})),r.createElement(a.du,null),r.createElement("div",{className:s().banks_wrapper,"data-nosnippet":!0},r.createElement(p.Z,null)),r.createElement(a.du,null),r.createElement(a.jS,{product:L,attrs:q,productSheetContainer:null!==(b=null==L?void 0:L.productSheetContainer)&&void 0!==b?b:null})),r.createElement(i.$_,null)))}},932911:function(e){e.exports={container:"AccessoryPageTemplate-module--container--zlUH9",content_wrapper:"AccessoryPageTemplate-module--content_wrapper--TGNWY",banks_wrapper:"AccessoryPageTemplate-module--banks_wrapper--V0daD"}}}]); 2//# sourceMappingURL=component---node-modules-womcorp-gatsby-theme-wom-accessories-src-templates-accessory-index-tsx-b80fd3c7c66895a70e9e.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.