3 lines
6.9 KiB
JavaScript
3 lines
6.9 KiB
JavaScript
|
|
import"./modulepreload-polyfill-B5Qt9EMX.js";import{d as R,t as z,r as G,c as p,a as T,u as w,o as n,w as i,b as X,_ as N,e as P,f as Y,g as J,s as V,h as K,i as I,C as j,j as F,k as M,l as W,m as Z,n as Q,T as ee,p as D,q as d,F as S,v as H,x as v,y as l,z as u,A as oe,B as se,D as te,E as ne,G as ae,H as re,I as ie,J as ce,K as le,L as pe,M as ue,N as de,O as me,P as _e,Q as e,R as he,S as ge,U as fe,V as be,W as ve,X as we,Y as Se,Z as ke,$ as Ae}from"./globals-BVeJWRKG.js";import{k as ye,n as Ce}from"./index-BKcJu8c2.js";const Ie=R({__name:"nav-bar-item",props:{to:{},disabled:{type:Boolean}},setup(o){const s=o,{to:t,disabled:a}=z(s);return(m,c)=>{const _=G("router-link");return w(a)?T("",!0):(n(),p(_,{key:0,to:w(t),class:"navigation__item","active-class":"navigation__item--active"},{default:i(()=>[X(m.$slots,"default",{},void 0,!0)]),_:3},8,["to"]))}}}),Pe=N(Ie,[["__scopeId","data-v-161b508a"]]);function L(o){const s=P(),t=Y();if(o.errors){s.errors=o.errors;return}s.defaultIsoCode=o.defaultIsoCode,s.shops=o.shops,s.isMultiShopContext=o.isMultiShopContext,s.routes=o.routes,s.phpVersion=o.phpVersion,s.merchantIp=o.merchantIp,s.moduleVersion=o.moduleVersion,s.merchantIp=o.merchantIp,s.psVersion=o.psVersion,s.activeHooks=o.activeHooks||{},t.tokenPsAccounts=o.tokenPsAccounts,t.psxShippingApiUrl=o.psxShippingApiUrl}const xe={class:"navigation"},Te=R({__name:"nav-bar",setup(o){const s=["Onboarding","NotFound"],{t}=J(),{onboarding:a}=V(P()),{getCarrier:m}=K(),c=W(),_=I(()=>m(j.STANDARD,F.MBE)!==null||m(j.EXPRESS,F.MBE)!==null),h=M([{name:t("pages.landing"),disabled:!1,componentToPush:"Landing"},{name:t("pages.faq"),disabled:!1,componentToPush:"FAQ"}]),b=M([{name:t("pages.home"),disabled:!1,componentToPush:"Home"},{name:t("pages.carriers"),disabled:!1,componentToPush:"Carriers"},{name:t("pages.orders"),disabled:_.value,componentToPush:"Orders"},{name:t("pages.pricingAndInvoices"),disabled:!1,componentToPush:"PricingInvoices"},{name:t("pages.account"),disabled:!1,componentToPush:"Settings"},{name:t("pages.faq"),disabled:!1,componentToPush:"FAQ"}]),r=M([]),x=I(()=>!s.includes(c.name)),k={Landing:()=>[...h.value],FAQ:()=>a.value.done?[...b.value]:[...h.value],others:()=>[...b.value]},A=g=>{r.value=k[g]?k[g]():k.others()};return Z(()=>c.name,g=>A(g),{deep:!0}),Q(()=>A(c.name)),(g,U)=>{const $=Pe;return x.value?(n(),p(ee,{key:0,to:".header-toolbar"},[D("div",xe,[(n(!0),d(S,null,H(r.value,(y,E)=>(n(),p($,{key:E,to:{name:y.componentToPush},disabled:y.disabled},{default:i(()=>[v(l(y.name),1)]),_:2},1032,["to","disabled"]))),128))])])):T("",!0)}}}),Ve=N(Te,[["__scopeId","data-v-fee2536a"]]),Re={class:"puik-h2"},$e=["data-test-shop-id"],Ee={class:"puik-body-large-bold sh-grow"},Me=R({__name:"multistore-selector",setup(o){const{shops:s}=V(P()),t=a=>{window.location.href=a};return(a,m)=>{const c=oe,_=se,h=te,b=ne;return n(),d(S,null,[u(c,{title:a.$t("multistoreSelector.alertMultistoreDetected.title"),variant:"warning"},{default:i(()=>[v(l(a.$t("multistoreSelector.alertMultistoreDetected.message")),1)]),_:1},8,["title"]),u(b,{class:"sh-my-4"},{default:i(()=>[D("p",Re,l(a.$t("multistoreSelector.cardTitle")),1),u(c,{variant:"info"},{default:i(()=>[v(l(a.$t("multistoreSelector.alertInfo.message")),1)]),_:1}),(n(!0),d(S,null,H(w(s),r=>(n(),d("div",{key:r.shopId,"data-test-shop-id":r.shopId,class:"sh-flex sh-items-center"},[D("div",Ee,[v(l(r.shopName)+" ",1),u(_,{class:"puik-body-small sh-ml-4",variant:"info"},{default:i(()=>[v(l(r.shopGroupName),1)]),_:2},1024)]),u(h,{onClick:x=>t(r.url)},{default:i(()=>[v(l(a.$t("multistoreSelector.configure")),1)]),_:2},1032,["onClick"])],8,$e))),128))]),_:1})],64)}}}),Oe={key:3,class:"sh-fixed sh-bottom-0 sh-right-0 sh-z-50 sh-text-white"},Be=R({__name:"App",setup(o){ae({script:[{type:"text/javascript",src:window.psAccountCdnUrl,async:!1,defer:!0},{type:"text/javascript",src:"https://unpkg.com/@prestashopcorp/billing-cdc/dist/bundle.js",async:!1,defer:!0}]});const{errors:s,getIsMultishopContext:t,onboarding:a}=V(P()),{state:m}=V(re()),{identify:c,group:_}=ie(),h=I(()=>window.contextPsAccounts?.currentShop
|
||
|
|
//# sourceMappingURL=main-DK-zb7gb.js.map
|