import{_ as q,s as z}from"./storeApi-DvUiFLZu.js";import{_ as Ne}from"./TitleBreadcrumb.vue_vue_type_style_index_0_lang-CV5GF5E_.js";import{_ as Ue}from"./warn-C4Q7ewaQ.js";import{I as W,k as p,X as U,o as h,A as _,a as e,w as o,e as d,t as N,ax as G,ae as L,af as F,b as n,U as K,N as w,ba as ee,s as V,$ as fe,d as D,ak as B,ay as oe,F as T,B as Z,c as ie,aB as O,f as ve,V as _e,ag as ce,ah as re,Q as ue,R as J,M as Y,bb as ge,bc as ye,Z as ne,l as Re,x as E,be as Te,G as H,u as Ee,am as Ae,aW as Me,aX as Q,aY as Pe}from"./index-DphlBmm9.js";import{_ as de,a as pe,b as he}from"./moren-CP7Lpf9S.js";import{_ as X}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{_ as Le}from"./wenhao-C-cdfRm0.js";const Be="/assets/shop-BXZKNfLY.png",ze="/assets/woo-DcdpDhMG.png",We={class:"d-flex align-center"},Oe={class:"text-center mt-4"},Ge=["src"],Fe=["src"],He=["src"],Ye=["src"],Je={class:"text-center mt-4"},Xe={class:"mt-3 text-center"},je={class:"btns mt-5"},Qe=W({__name:"ConnectShopDialog",emits:["reflash"],setup(C,{expose:$,emit:g}){let l=p(!1);p(!1);const r=p(!1),i=p(""),a=U({}),s=U({color:"",msg:"",isShow:!1});function S(b){a.value=b,l.value=!0}const v=()=>{i.value="",l.value=!1};function k(){r.value=!0;const b=z();a.value.type==1&&a.value.shopId?b.shopifyUrlGet({shopifyDomainName:i.value,shopId:a.value.shopId}).then(t=>{t.code==200?(r.value=!1,window.open(t.data.redirectUrl)):(r.value=!1,s.isShow=!0,s.color="error",s.msg=t.msg)}).catch(t=>{}):a.value.type==1&&!a.value.shopId&&b.shopifyUrlGet({shopifyDomainName:i.value}).then(t=>{t.code==200?(r.value=!1,window.open(t.data.redirectUrl)):(r.value=!1,s.isShow=!0,s.color="error",s.msg=t.msg)}).catch(t=>{console.log("cath...",t),s.isShow=!0,s.color="error",s.msg=t.msg}),a.value.type==3&&a.value.shopId&&b.woocommerceUrlGet({url:i.value,shopId:a.value.shopId}).then(t=>{t.code==200?(r.value=!1,window.open(t.data.redirectUrl)):(r.value=!1,s.isShow=!0,s.color="error",s.msg=t.msg)}).catch(t=>{console.log("cath...",t)}),a.value.type==3&&!a.value.shopId&&b.woocommerceUrlGet({url:i.value}).then(t=>{console.log("success",t),t.code==200?(r.value=!1,window.open(t.data.redirectUrl)):(r.value=!1,s.isShow=!0,s.color="error",s.msg=t.msg)}).catch(t=>{console.log("cath...",t)})}return $({openDialog:S,closeDialog:v}),(b,t)=>(h(),_(T,null,[e(G,{modelValue:s.isShow,"onUpdate:modelValue":t[0]||(t[0]=c=>s.isShow=c),color:s.color,timeout:3e3,variant:"flat",rounded:"md",location:"top"},{default:o(()=>[d(N(s.msg),1)]),_:1},8,["modelValue","color"]),e(oe,{modelValue:w(l),"onUpdate:modelValue":t[2]||(t[2]=c=>B(l)?l.value=c:l=c),"max-width":575},{default:o(()=>[e(L,null,{default:o(()=>[e(F,{style:{padding:"24px"}},{default:o(()=>[n("h3",We,[d("Let's Connect your Store! "),e(K,{src:w(ee),width:32,height:32,class:"close",onClick:v},null,8,["src"])]),n("div",Oe,[a.value.type==1||!a.value.type?(h(),_("img",{key:0,src:w(Be),style:{width:"87px",height:"87px"}},null,8,Ge)):V("",!0),a.value.type==2?(h(),_("img",{key:1,src:w(de),style:{width:"87px",height:"87px"}},null,8,Fe)):V("",!0),a.value.type==3?(h(),_("img",{key:2,src:w(ze),style:{width:"87px",height:"87px"}},null,8,He)):V("",!0),a.value.type==5?(h(),_("img",{key:3,src:w(q),style:{width:"87px",height:"87px"}},null,8,Ye)):V("",!0)]),n("h4",Je,"Connect "+N(a.value.type==1?"Shopify":"WooCommerce"),1),n("p",Xe,"Add your "+N(a.value.type==1?"Shopify":"WooCommerce")+" store URL to connect with JetPrint ",1),e(fe,{class:"mt-3",modelValue:i.value,"onUpdate:modelValue":t[1]||(t[1]=c=>i.value=c),label:a.value.type==1?"e.g.my-shop.myshopify.com":"https://www.examplestore.com",density:"comfortable",variant:"outlined",color:"primary","hide-details":"auto"},null,8,["modelValue","label"]),n("div",je,[e(D,{color:"lightprimary",onClick:v},{default:o(()=>[d("Cancel")]),_:1}),e(D,{class:"ml-4",color:"btnBlue",loading:r.value,disabled:r.value,onClick:k},{default:o(()=>[d("Connect")]),_:1},8,["loading","disabled"])])]),_:1})]),_:1})]),_:1},8,["modelValue"])],64))}}),we=X(Qe,[["__scopeId","data-v-efb5d258"]]),Ze=C=>(ce("data-v-f318a09a"),C=C(),re(),C),qe={class:"d-flex align-center ga-4"},Ke=["src"],eo={class:"text-h3 font-weight-medium"},oo={key:0,class:"position-relative",style:{"margin-left":"-10px",top:"2px"}},to=Ze(()=>n("img",{src:Ue,style:{width:"18px",height:"18px"},alt:""},null,-1)),lo={style:{"min-height":"150px"}},so=W({__name:"ConnectStore",setup(C){let $=U([{name:"Shopify",type:1,icon:pe,desc:["Allow to push products to stores","Allow your consumers to upload text and images","No limitations"]},{name:"Woocommerce",type:3,icon:he,desc:["Allow to push products to stores","No personalization features","No product limitations"]},{name:"Etsy",type:5,icon:q,desc:["Allow to push products to stores","Allow to push personalization features","Products can only be pushed attaching with 10 pictures and 13 tags"]}]);const g=p(null);let l=p(!1);function r(i){if(i.type==1)window.open("https://apps.shopify.com/jetprint-fulfillment");else if(i.type==3)g.value&&g.value.openDialog(i);else{l.value=!0;var a={};a.shopId=i.shopId||"";const s="https://dashboard.jetprintapp.com";a.callbackUrl=s+"/etsy/installs",z().getEtsyConnectUrl(a).then(v=>{l.value=!1,window.open(v.data)})}}return(i,a)=>(h(),_(T,null,[e(_e,null,{default:o(()=>[(h(!0),_(T,null,Z(w($),(s,S)=>(h(),ie(ve,{cols:"12",lg:"4",md:"4",sm:"6",key:S},{default:o(()=>[e(L,{variant:"outlined",class:"bg-gray100"},{default:o(()=>[e(F,{style:{padding:"24px"}},{default:o(()=>[n("div",qe,[n("img",{src:s.icon,style:{width:"48px",height:"48px"},alt:""},null,8,Ke),n("span",eo,N(s.name),1),S==2?(h(),_("div",oo,[e(O,{"max-width":"334px",activator:"parent",location:"top"},{default:o(()=>[d("The term 'Etsy' is a trademark of Etsy, Inc. This application uses the Etsy API but is not endorsed or certified by Etsy, Inc.")]),_:1}),to])):V("",!0)]),n("ul",lo,[(h(!0),_(T,null,Z(s.desc,(v,k)=>(h(),_("li",{style:{"font-size":"14px"},class:"mt-3",key:S},N(v),1))),128))]),e(D,{class:"mt-3 font-weight-medium connent-btn",block:"",variant:"outlined",height:"44",loading:S==2&&w(l),color:"primary",onClick:v=>r(s)},{default:o(()=>[d("Connect")]),_:2},1032,["loading","onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1}),e(we,{ref_key:"refConnectShopDialog",ref:g},null,512)],64))}}),ao=X(so,[["__scopeId","data-v-f318a09a"]]),no={class:"d-flex align-center"},io={class:"btns"},co=W({__name:"ResetNameDialog",emits:["reflash"],setup(C,{expose:$,emit:g}){let l=p(!1);const r=p(""),i=U({}),a=p(!1),s=ue(),S=J(()=>(console.log("computed...",s.merchantInfoMutations.currentShop),s.merchantInfoMutations.currentShop));J(()=>(console.log("computed...",s.merchantInfoMutations.currentShop),s.merchantInfoMutations.allShops));const v=g;let k=p(!1);const b=x=>{console.log("openDialog...",x),r.value=x.name,i.value=x,l.value=!0},t=()=>{l.value=!1};function c(){console.log(S.value),k.value=!0;const x=z(),y={shopId:i.value.shopId,shopName:r.value};x.setShopName(y).then(u=>{s.SET_MERCHANT_INFO_MUTATIONS(),k.value=!1,a.value=!0,t(),v("reflash")})}return $({openDialog:b,closeDialog:t}),(x,y)=>(h(),_(T,null,[e(G,{modelValue:a.value,"onUpdate:modelValue":y[0]||(y[0]=u=>a.value=u),color:"success",timeout:3e3,variant:"flat",rounded:"md",location:"top"},{default:o(()=>[d("Successfully")]),_:1},8,["modelValue"]),e(oe,{modelValue:w(l),"onUpdate:modelValue":y[3]||(y[3]=u=>B(l)?l.value=u:l=u),"max-width":575},{default:o(()=>[e(L,null,{default:o(()=>[e(F,{style:{padding:"24px"}},{default:o(()=>[n("h3",no,[d("Store Setup "),e(K,{src:w(ee),width:32,height:32,class:"close",onClick:y[1]||(y[1]=u=>B(l)?l.value=!1:l=!1)},null,8,["src"])]),e(Y,{class:"mt-6"}),e(fe,{modelValue:r.value,"onUpdate:modelValue":y[2]||(y[2]=u=>r.value=u),label:"Store Name",class:"mt-4 mb-6","hide-details":"auto",variant:"outlined",color:"primary"},null,8,["modelValue"]),n("div",io,[e(D,{class:"",color:"lightprimary",onClick:t},{default:o(()=>[d("Cancel")]),_:1}),e(D,{class:"ml-4",color:"btnBlue",loading:w(k),onClick:c},{default:o(()=>[d("Confirm")]),_:1},8,["loading"])])]),_:1})]),_:1})]),_:1},8,["modelValue"])],64))}}),ro=X(co,[["__scopeId","data-v-d7c45310"]]),uo=C=>(ce("data-v-5cd7fada"),C=C(),re(),C),po={class:"d-flex align-center"},ho=uo(()=>n("div",{class:"d-flex warn-con"},[n("div",{class:"warn pr-3 pt-1"},[n("img",{src:Le,alt:""})]),n("div",{class:"desc",style:{"line-height":"20px"}}," Due to sales channel limitations some sales channel specific product details like product description text formating and tags might be lost in copy process. ")],-1)),mo={key:0,class:"d-flex pa-3 ps-0"},fo={class:""},vo={class:""},_o={class:"font-weight-medium",style:{"font-size":"16px"}},go={class:"text-medium-emphasis text-subtitle-2"},yo={class:"ml-auto"},wo={key:0,src:pe,style:{width:"48px",height:"48px"},alt:""},xo={key:1,src:de,style:{width:"48px",height:"48px"},alt:""},So={key:2,src:he,style:{width:"48px",height:"48px"},alt:""},Io={key:3,src:q,style:{width:"48px",height:"48px"},alt:""},bo={class:"btns"},Co=W({__name:"CopyProductDialog",emits:["reflash"],setup(C,{expose:$,emit:g}){let l=p(!1);p(""),U({});const r=U([]);p(!1);const i=p(""),a=p(!1),s=U({color:"success",msg:"Your products are being duplicated in the background. You can continue using your account.",isShow:!1});let S=p(""),v=p("");const k=z();function b(){a.value=!0;const x={formStoreId:v.value,toStoreId:i.value};k.productAllBatch(x).then(y=>{a.value=!1,s.isShow=!0,c()})}function t(x,y,u){l.value=!0,S.value=x,v.value=y,r.value=u}const c=()=>{l.value=!1};return $({openDialog:t,closeDialog:c}),(x,y)=>(h(),_(T,null,[e(G,{modelValue:s.isShow,"onUpdate:modelValue":y[0]||(y[0]=u=>s.isShow=u),color:s.color,timeout:3e3,variant:"flat",rounded:"md",location:"top"},{default:o(()=>[d(N(s.msg),1)]),_:1},8,["modelValue","color"]),e(oe,{modelValue:w(l),"onUpdate:modelValue":y[3]||(y[3]=u=>B(l)?l.value=u:l=u),"max-width":575},{default:o(()=>[e(L,null,{default:o(()=>[e(F,{style:{"padding-top":"24px"}},{default:o(()=>[n("h3",po,[d("Copy "+N(w(S))+" products to … ",1),e(K,{src:w(ee),width:32,height:32,class:"close",onClick:y[1]||(y[1]=u=>B(l)?l.value=!1:l=!1)},null,8,["src"])]),e(Y,{class:"mt-4 mb-5"}),ho,e(Y,{class:"mt-5"}),e(ge,{class:"scroll",modelValue:i.value,"onUpdate:modelValue":y[2]||(y[2]=u=>i.value=u)},{default:o(()=>[(h(!0),_(T,null,Z(r.value,(u,te)=>(h(),_("div",{key:te},[w(v)!=u.shopId?(h(),_("div",mo,[n("div",fo,[e(ye,{color:"secondary",value:u.shopId,disabled:w(v)==u.shopId},null,8,["value","disabled"])]),n("div",vo,[n("p",_o,N(u.name),1),n("p",go,N(u.url?u.url:"No Sales Channel"),1)]),n("div",yo,[u.type==1?(h(),_("img",wo)):V("",!0),u.type==2||u.type==4?(h(),_("img",xo)):V("",!0),u.type==3?(h(),_("img",So)):V("",!0),u.type==5?(h(),_("img",Io)):V("",!0)])])):V("",!0),e(Y)]))),128))]),_:1},8,["modelValue"]),n("div",bo,[e(D,{class:"mt-4",color:"lightprimary",onClick:c},{default:o(()=>[d("Cancel")]),_:1}),e(D,{class:"mt-4 ml-4",color:"btnBlue",loading:a.value,disabled:a.value,onClick:b},{default:o(()=>[d("Confirm")]),_:1},8,["loading","disabled"])])]),_:1})]),_:1})]),_:1},8,["modelValue"])],64))}}),ko=X(Co,[["__scopeId","data-v-5cd7fada"]]),Vo=C=>(ce("data-v-dd55ad18"),C=C(),re(),C),$o={class:"d-flex align-center"},Do=Vo(()=>n("p",{class:"mt-4",style:{"line-height":"20px"}},"JetPrint account won't receive incoming orders for published products in your store. You won't be able to update products in your store from your JetPrint account. ",-1)),No={class:"btns"},Uo=W({__name:"DisconnectDialog",emits:["reflash"],setup(C,{expose:$,emit:g}){let l=p(!1);const r=p(!1),i=p(!1),a=p(""),s=g;function S(b){a.value=b,l.value=!0}const v=()=>{l.value=!1};function k(){i.value=!0,z().disconnect({shopId:a.value}).then(t=>{i.value=!1,v(),s("reflash",a.value)})}return $({openDialog:S,closeDialog:v}),(b,t)=>(h(),_(T,null,[e(G,{modelValue:r.value,"onUpdate:modelValue":t[0]||(t[0]=c=>r.value=c),color:"success",timeout:3e3,variant:"flat",rounded:"md",location:"top"},{default:o(()=>[d("Successfully")]),_:1},8,["modelValue"]),e(oe,{modelValue:w(l),"onUpdate:modelValue":t[2]||(t[2]=c=>B(l)?l.value=c:l=c),"max-width":575},{default:o(()=>[e(L,null,{default:o(()=>[e(F,{style:{"padding-top":"24px"}},{default:o(()=>[n("h3",$o,[d("Disconnect Your Store? "),e(K,{src:w(ee),width:32,height:32,class:"close",onClick:t[1]||(t[1]=c=>B(l)?l.value=!1:l=!1)},null,8,["src"])]),e(Y,{class:"mt-4"}),Do,n("div",No,[e(D,{class:"mt-4",color:"lightprimary",onClick:v},{default:o(()=>[d("Cancel")]),_:1}),e(D,{class:"mt-4 ml-4",color:"btnBlue",loading:i.value,disabled:i.value,onClick:k},{default:o(()=>[d("Confirm")]),_:1},8,["loading","disabled"])])]),_:1})]),_:1})]),_:1},8,["modelValue"])],64))}}),Ro=X(Uo,[["__scopeId","data-v-dd55ad18"]]),To={class:"",style:{position:"absolute",opacity:"0"}},Eo={class:"d-flex align-center"},Ao={class:"ml-4 font-weight-medium",style:{color:"#252525"}},Mo={style:{width:"50%"},class:"text-medium-emphasis"},Po={class:"font-weight-medium",style:{color:"#252525"}},Lo={style:{width:"50%"},class:"text-medium-emphasis"},Bo={class:"font-weight-medium",style:{color:"#252525"}},zo=W({__name:"StoreList",props:{type:String},setup(C){const $=C,g=ue(),l=p(null),r=p([]),i=p([]),a=z();let s=U({});const S=U({color:"",msg:"",isShow:!1}),v=U({color:"",msg:"",isShow:!1}),k=U({title:"",message:""}),b=J(()=>(l.value=g.merchantInfoMutations.currentShop.shopId,g.merchantInfoMutations.currentShop));ne(()=>$.type,(m,I)=>{let R=[];i.value.length>0&&(i.value.forEach((M,me)=>{m!=""?M.type==m&&R.push(M):R.push(M)}),r.value=R),console.log(`message prop changed from ${I} to ${m}`)});const t=J(()=>(console.log("computed...",g.merchantInfoMutations),g.merchantInfoMutations.login));function c(){if(t.value){const m={};m.type=$.type,a.shopList(m).then(I=>{r.value=I.data.records,i.value=I.data.records})}}Re(()=>{c()});function x(m){c(),y(m)}function y(m){r.value.forEach(I=>{if(m==I.shopId){const R={name:I.name,shopId:I.shopId,shopType:I.type};g.SET_MERCHANT_SHOP(R)}})}let u=p(null);function te(m,I){u.value&&u.value.openDialog(m,I,r.value)}let le=p(null);function xe(m){le.value&&le.value.openDialog(m)}const se=p(null),Se=m=>{se.value&&se.value.openDialog(m)},j=p(null);function Ie(m){j.value&&(s.value=m,k.title="Remove Store from JetPrint?",k.message="When clicked the Confirm button, this store will be closed after 1 second.",j.value.openDialog())}function be(){console.log("hanldeItem...",s.value.shopId),a.removeStore({shopId:s.value.shopId}).then(m=>{j.value.closeDialog(),v.isShow=!0,v.msg="Remove Store Success",v.color="success",g.SET_MERCHANT_INFO_MUTATIONS(),c()})}function Ce(m){if(m.indexOf("http")===0)window.open(m);else{const I="https://"+m;window.open(I)}}const ae=p(null);function ke(m){ae.value&&ae.value.openDialog(m)}let A=p("");return A.value=window.innerWidth,window.addEventListener("resize",function(m){A.value=window.innerWidth}),l.value=b.value.shopId,ne(()=>l.value,m=>{a.shopChange({shopId:m}).then(I=>{r.value.forEach(R=>{if(R.shopId==m){let M={name:R.name,shopId:R.shopId,shopType:R.type};g.SET_MERCHANT_SHOP(M)}})})}),(m,I)=>{const R=H("PencilMinusIcon"),M=H("CopyIcon"),me=H("UnlinkIcon"),Ve=H("TrashIcon"),$e=H("BuildingStoreIcon");return h(),_(T,null,[n("div",To,N(b.value),1),e(G,{modelValue:S.isShow,"onUpdate:modelValue":I[0]||(I[0]=f=>S.isShow=f),color:S.color,timeout:3e3,variant:"flat",rounded:"md",location:"top"},{default:o(()=>[d(N(S.msg),1)]),_:1},8,["modelValue","color"]),e(ge,{modelValue:l.value,"onUpdate:modelValue":I[2]||(I[2]=f=>l.value=f)},{default:o(()=>[(h(!0),_(T,null,Z(r.value,(f,De)=>(h(),_("div",{class:"text-grey-lighten-3 d-flex flex-wrap align-center",style:{"border-bottom":"1px solid #E3E8EF","padding-top":"24px","padding-bottom":"24px"},key:De},[n("div",{style:E((w(A)<=375,"width: 50px"))},[e(ye,{color:"secondary",rounded:"","hide-details":"",value:f.shopId,modelValue:l.value,"onUpdate:modelValue":I[1]||(I[1]=P=>l.value=P)},null,8,["value","modelValue"])],4),n("div",{style:E(w(A)<=775?"width: 80%":"width: 35%")},[n("div",Eo,[f.type==1?(h(),_("img",{key:0,src:pe,style:E([{opacity:f.isConnect?1:.3},{width:"46px",height:"46px"}])},null,4)):V("",!0),f.type==2||f.type==4?(h(),_("img",{key:1,src:de,style:E([{opacity:f.isConnect?1:.3},{width:"46px",height:"46px"}])},null,4)):V("",!0),f.type==3?(h(),_("img",{key:2,src:he,style:E([{opacity:f.isConnect?1:.3},{width:"46px",height:"46px"}])},null,4)):V("",!0),f.type==5?(h(),_("img",{key:3,src:q,style:E([{opacity:f.isConnect?1:.3},{width:"46px",height:"46px"}])},null,4)):V("",!0),n("span",Ao,N(f.name),1),e(D,{icon:"",color:"#252525",variant:"text",onClick:P=>Se(f)},{default:o(()=>[e(O,{activator:"parent",location:"top"},{default:o(()=>[d("Store Name")]),_:1}),e(R,{size:"20","stroke-width":"1.25"})]),_:2},1032,["onClick"])])],4),n("div",{class:"d-flex",style:E(w(A)<=775?"width: 100%;margin-top: 20px":"width: 30%")},[n("div",Mo,[d("Orders: "),n("span",Po,N(f.orderNum),1)]),n("div",Lo,[d("Products: "),n("span",Bo,N(f.productNum),1)])],4),n("div",{style:E(w(A)<=375?"width: 100%;":"width: 10%")},[f.isConnect?V("",!0):(h(),ie(D,{key:0,color:"primary",rounded:"",onClick:P=>ke(f.shopId),style:E(w(A)<=375?"margin-top: 20px":"")},{default:o(()=>[d(" Connect ")]),_:2},1032,["onClick","style"]))],4),n("div",{class:"d-flex",style:E(w(A)<900?"width: 100%;margin-top: 20px;":"width: 20%")},[n("div",null,[e(O,{activator:"parent",location:"top"},{default:o(()=>[d("Copy Poducts")]),_:1}),e(D,{icon:"",color:"#252525",variant:"text",disabled:r.value.length<=1||f.productNum===0,onClick:P=>te(f.productNum,f.shopId)},{default:o(()=>[e(M,{size:"20","stroke-width":"1.25"})]),_:2},1032,["disabled","onClick"])]),n("div",null,[e(O,{activator:"parent",location:"top"},{default:o(()=>[d("Disconnect")]),_:1}),e(D,{icon:"",color:"#252525",variant:"text",disabled:!f.isConnect||f.type==2,onClick:P=>xe(f.shopId)},{default:o(()=>[e(me,{size:"20","stroke-width":"1.25"})]),_:2},1032,["disabled","onClick"])]),n("div",null,[e(O,{activator:"parent",location:"top"},{default:o(()=>[d("Remove Store")]),_:1}),e(D,{icon:"",color:"#252525",variant:"text",disabled:f.type==2,onClick:P=>Ie(f)},{default:o(()=>[e(Ve,{size:"20","stroke-width":"1.25"})]),_:2},1032,["disabled","onClick"])]),n("div",null,[e(O,{activator:"parent",location:"top"},{default:o(()=>[d("Visit Store")]),_:1}),e(D,{icon:"",color:"#252525",variant:"text",disabled:!f.url,onClick:P=>Ce(f.url)},{default:o(()=>[e($e,{size:"20","stroke-width":"1.25"})]),_:2},1032,["disabled","onClick"])])],4)]))),128))]),_:1},8,["modelValue"]),e(ro,{ref_key:"refResetName",ref:se,onReflash:c},null,512),e(ko,{ref_key:"refCopyProduct",ref:u,onReflash:c},null,512),e(Ro,{ref_key:"refDisconnect",ref:le,onReflash:x},null,512),e(Te,{ref_key:"refDelProduct",ref:j,title:k.title,message:k.message,onReflash:be},null,8,["title","message"]),e(we,{ref_key:"refConnectShopDialog",ref:ae,onReflash:c},null,512)],64)}}}),Wo={class:"pa-5"},jo=W({__name:"Index",setup(C){const $=ue(),g=p("tab-profile"),l=U([{title:"Integrations",disabled:!0,href:"#"}]),r=p(1),i=U({color:"",msg:"",isShow:!1});ne(()=>g.value,(t,c)=>{t=="tab-myStore"&&(r.value=""),t=="tab-myStore"&&(r.value=""),t=="tab-myStore"&&(r.value=""),t=="tab-myStore"&&(r.value="")});const a=J(()=>(console.log("computed...",$.merchantInfoMutations),$.merchantInfoMutations.login));function s(t){var c=new RegExp("(^|&)"+t+"=([^&]*)(&|$)","i"),x=window.location.search.substr(1).match(c);return x!=null?unescape(x[2]):null}const S=z();var v=s("code"),k=s("state"),b=s("error");return console.log("code...",v),console.log("state...",k),console.log("error...",b),v&&v!=null&&(Ee().query,S.submitEtsyConnect({code:v,state:k}).then(c=>{c.code==200?(i.color="success",i.msg="connect etsy shop success!",i.isShow=!0):(i.color="error",i.msg=c.msg,i.isShow=!0)})),(t,c)=>(h(),_(T,null,[e(G,{modelValue:i.isShow,"onUpdate:modelValue":c[0]||(c[0]=x=>i.isShow=x),color:i.color,timeout:3e3,variant:"flat",rounded:"md",location:"top"},{default:o(()=>[d(N(i.msg),1)]),_:1},8,["modelValue","color"]),e(Ne,{title:"Integrations",breadcrumbs:l},null,8,["breadcrumbs"]),e(L,{variant:"flat",class:"px-4 py-3"},{default:o(()=>[e(Ae,{class:"text-subtitle-6 font-weight-medium pb-5"},{default:o(()=>[d("Let's connect your store!")]),_:1}),e(F,null,{default:o(()=>[e(ao,{class:"mt-3"})]),_:1})]),_:1}),a.value?(h(),ie(L,{key:0,variant:"flat",class:"px-4 py-3 mt-4"},{default:o(()=>[e(_e,null,{default:o(()=>[e(ve,{cols:"12"},{default:o(()=>[e(Me,{modelValue:g.value,"onUpdate:modelValue":c[1]||(c[1]=x=>g.value=x),"selected-class":"integrationsactivedTab"},{default:o(()=>[e(Q,{value:""},{default:o(()=>[d("My Store")]),_:1}),e(Q,{value:"1"},{default:o(()=>[d("Shopify")]),_:1}),e(Q,{value:"3"},{default:o(()=>[d("Woocommerce")]),_:1}),e(Q,{value:"5"},{default:o(()=>[d("Etsy")]),_:1})]),_:1},8,["modelValue"]),n("div",Wo,[e(Pe,{modelValue:g.value,"onUpdate:modelValue":c[2]||(c[2]=x=>g.value=x)},{default:o(()=>[e(zo,{type:g.value},null,8,["type"])]),_:1},8,["modelValue"])])]),_:1})]),_:1})]),_:1})):V("",!0)],64))}});export{jo as default};