import{I as s,t as e,x as n,Q as r,P as o,F as u,Y as y,_ as c,W as h,L as f,O as p,N as k}from"./vue.02ad7c87.js";import{_ as T,aE as O,aF as P,aG as R,I as B,h as F}from"./index.f2790301.js";import{s as I}from"./startCase.0949da17.js";const N=_=>{const i=[];for(let a=0;a<_.length;a+=1){const g=_[a];for(let t=0;t<g.length;t+=1)i[t]||(i[t]=[]),i[t].push(g[t])}return i},A={name:"SizeChartTable",props:{tableData:Array}},U={class:"size-chart-table"};function V(_,i,a,g,t,z){const x=s("tml-data-table-head-cell"),w=s("tml-data-table-body-cell"),C=s("tml-data-table");return e(),n("div",U,[a.tableData?(e(),r(C,{key:0,"table-data":a.tableData.slice(1,a.tableData.length)},{"table-head":o(()=>[(e(!0),n(u,null,y(a.tableData[0],(m,b)=>(e(),r(x,{key:b},{default:o(()=>[c(h(m),1)]),_:2},1024))),128))]),"table-body":o(m=>[(e(!0),n(u,null,y(m.data,(b,S)=>(e(),r(w,{key:S},{default:o(()=>[c(h(b),1)]),_:2},1024))),128))]),_:1},8,["table-data"])):f("",!0)])}const W=T(A,[["render",V]]),L={name:"SizeChartPopup",components:{SizeChartTable:W},props:{product:Object,showReturnsInfo:{type:Boolean,default:!0},helpPage:{type:String,default:"help"}},data(){return{loading:!0,showCentimeters:!0,sizeChart:null,transposeTableArray:N,isEU:O,isRestOfWorld:P,splitTests:R}},methods:{startCase:I,maxDevice:B,onOpen(){this.sizeChart||this.axios.get(F(`/omnis/v3/size-charts/get/${this.product.sizeChartId}`)).success(_=>{this.sizeChart=_}).finally(()=>{this.loading=!1})}}},Q={key:0},j={key:1},q={key:1},G={class:"mt-8 mb-4"},K=c(" There's no need to worry because we guarantee "),Y=c(". "),H=k("p",{class:"mb-4"}," Every one of our customers is important to us. So you're in safe hands - We'll make sure it's quick and easy to get your size right, no hassle guaranteed. ",-1),J={class:"mb-4"},M=c(" Fast answers can be found in our ");function X(_,i,a,g,t,z){const x=s("tml-tab-header-item"),w=s("tml-tab-header"),C=s("size-chart-table"),m=s("tml-tab-body-item"),b=s("tml-tab-body"),S=s("tml-tabbed-container"),D=s("tml-anchor"),v=s("tml-loader"),E=s("tml-new-popup");return e(),r(E,{name:`size-popup-${a.product.id}`,title:"Sizing",layout:"standard",size:"normal",fill:!1,"disable-route-changes":"",onEnter:z.onOpen},{content:o(()=>[p(v,{loading:t.loading,height:"400px"},{default:o(()=>[t.sizeChart?(e(),n(u,{key:0},[t.sizeChart.sizes?(e(),r(S,{key:0},{default:o(()=>[p(w,null,{default:o(()=>[(e(!0),n(u,null,y(t.sizeChart.sizes,(d,l)=>(e(),r(x,{key:l},{default:o(()=>[c(h(l),1)]),_:2},1024))),128))]),_:1}),p(b,null,{default:o(()=>[(e(!0),n(u,null,y(t.sizeChart.sizes,(d,l)=>(e(),r(m,{key:l},{default:o(()=>[z.maxDevice("md")?(e(),r(C,{key:0,"table-data":t.transposeTableArray(d)},null,8,["table-data"])):(e(),r(C,{key:1,"table-data":d},null,8,["table-data"]))]),_:2},1024))),128))]),_:1})]),_:1})):f("",!0),t.sizeChart.instructions?(e(!0),n(u,{key:1},y(t.sizeChart.instructions,(d,l)=>(e(),n("p",{key:l,class:"mb-2"},[l!=="tagLine"?(e(),n("span",Q,[k("strong",null,h(z.startCase(l)),1),c(": "+h(d),1)])):(e(),n("span",j,h(d),1))]))),128)):f("",!0)],64)):f("",!0),a.showReturnsInfo?(e(),n("div",q,[k("p",G,[K,p(D,{href:`/${a.helpPage}/?search=Returns`,text:`simple returns & exchanges${t.isEU.passes||t.isRestOfWorld.passes?"":", with freepost returns for all UK orders"}`},null,8,["href","text"]),Y])])):f("",!0),H,k("p",J,[M,p(D,{href:`/${a.helpPage}/`,text:"FAQ"},null,8,["href"])])]),_:1},8,["loading"])]),_:1},8,["name","onEnter"])}const te=T(L,[["render",X]]);export{te as S};
//# sourceMappingURL=SizeChartPopup.b6f669e6.js.map
