import{h as s,o,w as g,b as r,a as m,u as f,$ as C,k as b,f as h,A as v,c as y,F as $,G as x,a0 as w}from"./index-DRopsKkO.js";import{a as S,c as A,_ as U}from"./BasePage-C3DiNX0e.js";import{_ as G,a as M,u as j,O as B}from"./index-_-ijfL1Q.js";import{_ as N}from"./UCard.vue_vue_type_script_setup_true_lang-a0COP_81.js";import"./UDivider.vue_vue_type_script_setup_true_lang-CGxguuHo.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"},O=["src"],R={class:"!space-y-2"},z={__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=G,i=M,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,O)]),r("div",R,[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})}}},E={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"},q={__name:"Page",setup(a){const p=C(),e=j(),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=A,c=w;return o(),s(U,{group:t.$t("group.marketConnect"),"group-step":f(B)*7,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",E,[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(z,{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{q as default};
