import{d as D,s as L,p as E,o as q,r as g,f as r,g as x,x as P,w as s,i as a,y as A,h as o,G as M,L as N,I as B,O as G,a as Y,cQ as J,t as y,F as V,C as k,j as v,D as X,J as Z,S as ee,k as C,T as te,V as R,K as se,l as T,m as F,A as $,d5 as ae,cS as j,_ as oe}from"./index-N7CMQwFv.js";import{s as ne,a as ie}from"./shopify-DQibm-aH.js";import{_ as le}from"./paymentDialog.vue_vue_type_script_setup_true_lang-Drv7o1Ex.js";import{l as re,c as ce,p as ue}from"./paypal.vue_vue_type_script_setup_true_lang-CuoOphF2.js";import{V as U}from"./VRow-CGgRlzLk.js";import{V as z}from"./VCol-xRADuXqd.js";import{V as de}from"./VChip-iaVLrPY0.js";import{V as pe,a as me,c as fe}from"./VList-BYq4u0VJ.js";import{a as be,b as ye,c as ge,V as he}from"./VExpansionPanels-DKrXLqwV.js";import"./payApi-srUkZfta.js";/* empty css */import"./VSlideGroup-BGEgBoXK.js";const ve={id:"paypal-buttons-container2"},xe=D({__name:"subPaypal",emits:["update:subPaymentVisible"],setup(S,{emit:f}){const l=L(),u=E(),p=f,h=()=>{p("update:subPaymentVisible",!1)};q(async()=>{await re({clientId:"Ad_2nWfHg-jljIyJdtNKa_8Vt9CzTPSn99w5REF3BFBV13lrA1QUF7HV5uSN3dwfV1Gag-YUMKfQyl2B",currency:"USD",vault:!0}).then(n=>{n==null||n.Buttons({style:{layout:"vertical",color:"silver"},async createSubscription(c,d){const I=await _();return await d.subscription.create(I)},onApprove(c,d){return m(c.subscriptionID)}}).render("#paypal-buttons-container2")})});const _=async()=>{const n=g({});return await ce({}).then(c=>{n.value={plan_id:c.data.planId,custom_id:c.data.customId,subscriber:{email:c.data.email}}}),n.value},m=async n=>{const c=g({});c.value.subscriptionID=n;const d=await ue(c.value);if(d.code===200){if(d.data.status===2){l.changeSnackbar({color:"#7367f0",location:"top",variant:"elevated",text:"Change subscription success !",visible:!0}),setTimeout(()=>{u.changeReload()},500),h();return}if(d.data.status===3){l.changeSnackbar({color:"#ff4c51",location:"top",variant:"elevated",text:d.data.failReason,visible:!0}),u.changeReload();return}d.data.status===1&&m(n)}};return(n,c)=>(r(),x("div",ve))}}),Pe={class:"d-flex justify-end"},_e={class:"right-card-box-payment-method"},Ve=D({__name:"subscriptionPayment",props:["subPaymentVisible"],emits:["update:subPaymentVisible"],setup(S,{emit:f}){const l=S,u=f;L();const p=()=>{u("update:subPaymentVisible",!1)},h=()=>{u("update:subPaymentVisible",!1)};return g(!1),(_,m)=>(r(),P(G,{modelValue:l.subPaymentVisible,"onUpdate:modelValue":m[0]||(m[0]=n=>l.subPaymentVisible=n),width:_.$vuetify.display.smAndDown?"auto":800,persistent:""},{default:s(()=>[a(A,{class:"pa-6 pa-2 pause-dialog"},{default:s(()=>[o("div",Pe,[a(M,{icon:"custom-close-line",onClick:N(h,["prevent"])})]),a(B,{class:"pa-5 pt-2"},{default:s(()=>[o("div",_e,[a(xe,{"onUpdate:subPaymentVisible":p})])]),_:1})]),_:1})]),_:1},8,["modelValue","width"]))}}),Se="/assets/base-CUXh3sFn.png",we="/assets/standard-yx0ODweY.png",ke={class:"text-center"},Ce={class:"text-h3 pricing-title mb-2"},Ie={class:"text-h4 mb-1 text-center"},Ue={class:"mb-0 text-body-1 text-center",style:{"font-size":"18px","font-weight":"500"}},Ae={class:"position-relative"},Be={class:"d-flex justify-center pt-5 pb-10"},De={class:"text-h1 font-weight-medium text-color-primary"},Le={class:"FAQ-box",style:{"min-height":"274px"}},Re=D({__name:"index",props:{title:{},xs:{},sm:{},md:{},lg:{},xl:{}},setup(S){const f=S,l=Y(),u=J(),p=L(),h=E(),_=g(!0),m=g([]),n=g(!1);(async()=>{const i=await ae();m.value=[{level:1,name:"Basic",tagLine:"A simple start for everyone",logo:Se,monthlyPrice:0,yearlyPrice:0,isPopular:l.getUserBaseInfo.fittingsLevel===1,current:!0,features:["Free jewelry box that can meet most purchase needs"],levelPhotos:i.data.level1Photos},{level:2,name:"Standard",tagLine:"For small to medium businesses",logo:we,monthlyPrice:i.data.level2Price,yearlyPrice:i.data.level2Price*12,isPopular:l.getUserBaseInfo.fittingsLevel===2,current:!1,features:["Get more advanced jewelry gift box below the market price","High - end gift boxes are beneficial to improve buyers'favorable impression of your brand","Unlock more exclusive styles or customized jewelry box series without worrying about inventory backlogs. Our factory will bear the production and stocking costs of small batch production for you."],levelPhotos:i.data.level2Photos}]})();const d=[{num:1,title:"How to bind new attachments to already listed products",content:'For listed products, you can go to the "My Products" menu to bind or modify new attachments in batches.'},{num:2,title:"Why Artshine can be offered to you below market price",content:"We have special subsidies to support our customers so that they can improve their buying experience for products"},{num:3,title:"Will it be required automatically",content:"We will not auto-renew, but usually customers get a pretty good experience from the plan and they tend to come back and subscribe again"}],I=i=>{l.getUserBaseInfo.currentShop.shopType===1?ne({level:i,returnUrl:K()}).then(e=>{if(e.code===200){const t=e.data;if(t.status===1){p.changeSnackbar({color:"#7367f0",location:"top",variant:"elevated",text:"Change subscription success!",visible:!0}),setTimeout(()=>{h.changeReload(),l.setInitUserInfo()},500);return}t.status===2&&H(t.confirmationUrl)}else p.changeSnackbar({color:"#ff4c51",location:"top",variant:"elevated",text:e.msg,visible:!0})}):i===1?Q():w.value=!0},Q=()=>{ie({}).then(i=>{i.code===200?(p.changeSnackbar({color:"#7367f0",location:"top",variant:"elevated",text:"Cancel subscription success!",visible:!0}),setTimeout(()=>{h.changeReload(),l.setInitUserInfo()},500)):p.changeSnackbar({color:"#ff4c51",location:"top",variant:"elevated",text:i.msg,visible:!0})}).finally(()=>{})},H=i=>{u.getAPP?j.Redirect.create(u.getAPP).dispatch(j.Redirect.Action.REMOTE,{url:i,newContext:!1}):location.href=i},K=()=>u.getAPP?`https://${u.getSHOP}/admin/apps/e0080c246e19620838062418c3259ac2/PaymentStatus`:`https://${location.host}/PaymentStatus`,w=g(!1),O=()=>{l.setInitUserInfo()};return(i,e)=>(r(),x(V,null,[a(A,{class:"plan-box",style:{"min-height":"1050px"}},{default:s(()=>[o("div",ke,[o("h3",Ce,y(f.title?f.title:"Pricing Plans"),1),e[2]||(e[2]=o("p",{class:"mb-0",style:{"font-size":"18px"}}," All plans include 40+ advanced tools and features to boost your product. ",-1)),e[3]||(e[3]=o("p",{class:"mb-2",style:{"font-size":"18px"}}," Choose the best plan to fit your needs. ",-1))]),a(U,null,{default:s(()=>[(r(!0),x(V,null,k(v(m),t=>(r(),P(z,X({key:t.logo,ref_for:!0},f,{cols:"12",md:"6"}),{default:s(()=>[a(A,{flat:"",border:"",class:Z(t.isPopular?"card-active-border border-opacity-100":"")},{default:s(()=>[a(B,{style:{"block-size":"3.75rem"},class:"text-end d-flex justify-space-between align-center"},{default:s(()=>[ee(a(de,{label:"",color:"primary-status",size:"small"},{default:s(()=>e[4]||(e[4]=[C(" Popular ")])),_:2,__:[4]},1536),[[te,t.isPopular]])]),_:2},1024),a(B,null,{default:s(()=>[a(R,{height:120,width:120,src:t.logo,class:"mx-auto mb-5"},null,8,["src"]),o("h4",Ie,y(t.name),1),o("p",Ue,y(t.tagLine),1),o("div",Ae,[o("div",Be,[e[5]||(e[5]=o("div",{class:"text-body-1 align-self-start font-weight-medium"}," $ ",-1)),o("h1",De,y(v(_)?Math.floor(Number(t.yearlyPrice)/12):t.monthlyPrice),1),e[6]||(e[6]=o("div",{class:"text-body-1 font-weight-medium align-self-end",style:{"font-size":"16px","font-weight":"500"}}," /Month ",-1))])]),a(pe,{class:"card-list mb-4"},{default:s(()=>[(r(!0),x(V,null,k(t.features,b=>(r(),P(me,{key:b},{prepend:s(()=>[a(M,{size:"8",icon:"list-item-circle-line-icon",color:"rgba(var(--v-theme-on-surface), var(--v-medium-emphasis-opacity))"})]),default:s(()=>[a(fe,{class:"text-body-1"},{default:s(()=>[o("div",null,y(b),1)]),_:2},1024)]),_:2},1024))),128))]),_:2},1024),a(U,{class:"mb-5"},{default:s(()=>[(r(!0),x(V,null,k(t.levelPhotos,(b,W)=>(r(),P(z,{key:W,md:"4",cols:"12"},{default:s(()=>[a(R,{src:b,class:"plan-img"},{placeholder:s(()=>[a(U,{align:"center",class:"fill-height ma-0",justify:"center"},{default:s(()=>[a(se,{color:"grey-lighten-5",indeterminate:""})]),_:1})]),_:2},1032,["src"])]),_:2},1024))),128))]),_:2},1024),v(l).getUserBaseInfo.fittingsLevel!==t.level?(r(),P(T,{key:0,block:"",color:"primary-status",variant:"elevated",active:!1,onClick:N(b=>I(t.level),["stop"])},{default:s(()=>e[7]||(e[7]=[C(" Upgrade ")])),_:2,__:[7]},1032,["onClick"])):F("",!0),v(l).getUserBaseInfo.fittingsLevel===t.level?(r(),P(T,{key:1,block:"",color:"success",variant:"tonal",class:"mb-3",active:!1},{default:s(()=>e[8]||(e[8]=[C(" Your Current Plan ")])),_:1,__:[8]})):F("",!0)]),_:2},1024)]),_:2},1032,["class"])]),_:2},1040))),128))]),_:1})]),_:1}),o("div",Le,[e[9]||(e[9]=o("h4",{class:"text-h4 text-center mb-6"}," FAQ's ",-1)),e[10]||(e[10]=o("p",{class:"mb-0 text-center mb-6 FAQ-text"}," Let us help answer the most common questions. ",-1)),a(he,{variant:"popout"},{default:s(()=>[(r(),x(V,null,k(d,(t,b)=>a(be,{key:b},{default:s(()=>[a(ye,null,{default:s(()=>[C(y(t.title),1)]),_:2},1024),a(ge,null,{default:s(()=>[o("div",null,y(t.content),1)]),_:2},1024)]),_:2},1024)),64))]),_:1})]),a(le,{"payment-dialog-visible":v(n),"onUpdate:paymentDialogVisible":e[0]||(e[0]=t=>$(n)?n.value=t:null),"pay-target":5,"onUpdate:subPaymentVisible":O},null,8,["payment-dialog-visible"]),a(Ve,{"sub-payment-visible":v(w),"onUpdate:subPaymentVisible":e[1]||(e[1]=t=>$(w)?w.value=t:null)},null,8,["sub-payment-visible"])],64))}}),We=oe(Re,[["__scopeId","data-v-5be04c59"]]);export{We as default};