import{d as L,r as u,x as v,w as n,O as U,f,i as o,y as W,h as d,G as D,L as m,I as E,g as V,F as R,C as T,j as p,A as x,cc as A,J as B,cg as N,V as P,t as h,m as j,E as F,l as _,k as g,_ as M}from"./index-N7CMQwFv.js";import{w as z}from"./wix-CAmUxDmY.js";import{b as G,d as O,f as $,h as J}from"./shop-B60azvAa.js";import{S as X,E as Y,W as q}from"./woo-sVdUHmJL.js";import{V as H}from"./VRow-CGgRlzLk.js";import{V as K}from"./VCol-xRADuXqd.js";import{V as Q,a as Z}from"./VRadioGroup-Bk91gCKJ.js";import{V as ee}from"./VSpacer-DhS9qmnu.js";/* empty css              */const te={class:"d-flex justify-end"},ae={class:"flex-grow-1"},oe={class:"d-flex align-center mb-2"},le={class:"d-flex align-center"},se={class:"cr-title text-base ml-2"},ne={key:0,class:"text-disabled text-body-2"},de={class:"text-body-2 mb-0"},ie={class:"mt-5"},re={class:"d-flex justify-end align-center mt-10"},ce=L({__name:"connectShop",props:["connectShopVisible","shopId"],emits:["update:connectShopVisible"],setup(b,{emit:w}){const r=b,y=w,i=()=>{y("update:connectShopVisible",!1)},k=u([{id:2,name:"Shopify",link:"adsfasdfadfasdfadsf",describe:"Ecommerce platform with everything you need to sel online.",type:"",text:"Platform",logo:X},{id:3,name:"Marketplace",link:"adsfasdfadfasdfadsf",describe:"A creative marketplace withover 80 million active buyers world wide.",type:"",text:"Marketplace",logo:Y},{id:4,name:"WooCommerce",link:"adsfasdfadfasdfadsf",describe:"The simplest way to monetizeblogs and websites built on WordPress.",type:"",text:"Open source platform",logo:q},{id:5,name:"WIX",link:"adsfasdfadfasdfadsf",describe:"Wix offers a flexible platform and convenient store setup methods, giving you complete control over your store design.",type:"",text:"Platform",logo:z}]),t=u(null),s=u(null),c=u(!1),C=()=>{c.value=!0,t.value===2&&G({shopId:r.shopId,shopifyDomainName:s.value}).then(l=>{window.open(l.data.redirectUrl,"_blank"),t.value=null,s.value=null,c.value=!1,i()}).catch(l=>{c.value=!1}),t.value===4&&O({shopId:r.shopId,url:s.value}).then(l=>{window.open(l.data.redirectUrl,"_blank"),t.value=null,s.value=null,c.value=!1,i()}).catch(l=>{c.value=!1})},S=()=>{t.value===3&&$({callbackUrl:"https://www.artshiney.com/etsy/install"}).then(a=>{window.open(a.data,"_blank"),t.value=null,s.value=null,i()}),t.value===5&&J({shopId:r.shopId,url:s.value}).then(l=>{window.open(l.data,"_blank"),t.value=null,s.value=null,i()})};return(l,a)=>(f(),v(U,{modelValue:r.connectShopVisible,"onUpdate:modelValue":a[2]||(a[2]=e=>r.connectShopVisible=e),width:l.$vuetify.display.smAndDown?"auto":1200,persistent:""},{default:n(()=>[o(W,{class:"pa-6 pa-2 add-product-dialog"},{default:n(()=>[d("div",te,[o(D,{icon:"custom-close-line",onClick:m(i,["prevent"])})]),o(E,{class:"pa-0 mt-5"},{default:n(()=>[o(H,null,{default:n(()=>[(f(!0),V(R,null,T(p(k),(e,ue)=>(f(),v(K,{key:e.id,md:"4",sm:"6",xs:"12",lg:"4",xl:"4",xxl:"2",clos:"12"},{default:n(()=>[o(Q,{modelValue:p(t),"onUpdate:modelValue":[a[0]||(a[0]=I=>x(t)?t.value=I:null),S]},{default:n(()=>[o(A,{class:B(["custom-input custom-radio rounded cursor-pointer",p(t)===e.id?"active":""])},{default:n(()=>[d("div",null,[o(Z,{name:e.id,value:e.id},null,8,["name","value"])]),N(l.$slots,"default",{item:e},()=>[d("div",ae,[d("div",oe,[d("div",le,[o(P,{src:e.logo,width:"50",rounded:"circle"},null,8,["src"]),d("h6",se,h(e.name),1)]),o(ee),e.text?(f(),V("span",ne,h(e.text),1)):j("",!0)]),d("p",de,h(e.describe),1)])],!0)]),_:2},1032,["class"])]),_:2},1032,["modelValue"])]),_:2},1024))),128))]),_:3}),d("div",ie,[o(F,{modelValue:p(s),"onUpdate:modelValue":a[1]||(a[1]=e=>x(s)?s.value=e:null),label:"Add your store URL to connect with ArtShiney",inset:"",variant:"outlined",height:"50"},null,8,["modelValue"])]),d("div",re,[o(_,{variant:"outlined",color:"#6D788D",height:"42px",onClick:m(i,["prevent"])},{default:n(()=>a[3]||(a[3]=[g(" Cancel ")])),_:1,__:[3]}),o(_,{class:"text-none text-subtitle-1 ml-5",color:"#000000",height:"42px",variant:"flat",onClick:m(C,["prevent"])},{default:n(()=>a[4]||(a[4]=[g(" Confirm ")])),_:1,__:[4]})])]),_:3})]),_:3})]),_:3},8,["modelValue","width"]))}}),be=M(ce,[["__scopeId","data-v-a0292e22"]]);export{be as default};