import{h as s,o,w as g,b as r,a as m,u as f,Z as C,g as b,k as h,z as v,c as y,F as $,E as x,$ as w}from"./index-CdEV5Lsj.js";import{_ as S,c as U,a as A}from"./BasePage-aJlR_RJI.js";import{_ as M,a as j,u as B,O as G}from"./index-DruWBKkm.js";import{_ as N}from"./UCard.vue_vue_type_script_setup_true_lang-ChrBK72a.js";import"./UDivider.vue_vue_type_script_setup_true_lang-CBOjoWJ-.js";const L=""+new URL("marketConnect-CPjQ8PBO.svg",import.meta.url).href,P={class:"bg-brand-50 mb-3 flex h-[60px] items-center rounded justify-center"},z=["src"],E={class:"!space-y-2"},O={__name:"AddonCard",props:{item:{type:Object,default:null}},emits:["toggleAddon"],setup(a,{emit:p}){const e=a,d=p,_=e.item.vendorName,u=()=>{d("toggleAddon",e.item.id,!e.item.state)};return(t,l)=>{const n=S,c=M,i=j,k=N;return o(),s(k,{class:"!p-4"},{default:g(()=>[r("div",P,[r("img",{class:"max-h-[45px] max-w-[140px]",src:a.item.logoPath},null,8,z)]),r("div",E,[m(n,{line:"",size:"lg",class:"font-bold",html:a.item.title},null,8,["html"]),m(n,{line:"",class:"text-gray-400",html:t.$t("label.marketConnectFromVendor",{vendorName:f(_)})},null,8,["html"]),m(c,{underlined:"",target:"_blank",size:"sm",href:a.item.learnMoreUrl,label:t.$t("label.learnMore")},null,8,["href","label"]),a.item.state?(o(),s(i,{key:1,block:"",size:"sm",color:"gray",variant:"secondary",label:t.$t("global.remove"),class:"!border-brand-200 !text-gray-400",onClick:u},null,8,["label"])):(o(),s(i,{key:0,label:t.$t("global.add"),block:"",size:"sm",onClick:u},null,8,["label"]))])]),_:1})}}},R={class:"flex w-screen flex-wrap justify-center gap-y-3 lg:w-[1080px]"},I={class:"flex w-full flex-wrap justify-center gap-4"},Z={__name:"Page",setup(a){const p=C(),e=B(),d=b(()=>e.marketConnect.services.length===0);h(async()=>{e.marketConnect.services.length||await e.getMarketConnect()});function _(t,l){const n=e.marketConnect.services.findIndex(c=>c.id===t);~n&&(e.marketConnect.services[n].state=l)}async function u(t){e.marketConnect.isLoggedIn?(await e.saveMarketConnectAddons({services:e.addonIdToSelectionStatusMap}),t()):p.push({name:"GettingStarted/MarketConnect/Step2"})}return(t,l)=>{const n=U,c=w;return o(),s(A,{group:t.$t("group.marketConnect"),"group-step":f(G)*6,title:t.$t("title.marketConnect"),prev:{name:"GettingStarted/Hosting"},next:{name:"GettingStarted/Complete"},skip:{name:"GettingStarted/Complete"},description:t.$t("description.marketConnect"),onContinue:u},{default:g(()=>[r("div",R,[m(n,{align:"center",class:"mb-5 justify-center"},{default:g(()=>l[0]||(l[0]=[r("img",{src:L},null,-1)])),_:1}),r("div",I,[(o(!0),y($,null,x(f(e).marketConnect.services,i=>(o(),s(O,{key:i.id,item:i,class:"col-span-3 w-[240px]",onToggleAddon:_},null,8,["item"]))),128))]),d.value?(o(),s(n,{key:0,justify:"center",class:"!my-5"},{default:g(()=>[m(c,{loading:d.value,color:"gray"},null,8,["loading"])]),_:1})):v("",!0)])]),_:1},8,["group","group-step","title","description"])}}};export{Z as default};
