import{U as A,aU as z,a$ as le,c as b,o as i,w as a,a as t,d9 as ie,b as l,H as v,F as k,aZ as x,bd as T,aW as p,bm as c,bG as ne,bX as M,bY as V,cm as J,ap as j,d as U,c2 as E,cb as S,aA as N,f as W,V as B,ay as re,bW as O,da as H,db as de,c1 as ue,e as Y,b_ as ce,ax as me,G as X,dc as Z,dd as q,de as pe,bU as he,z as P,aH as fe}from"./index-B4XbvW4T.js";import{o as ve}from"./orderApi-hJax81EV.js";import{G as ge,d as D}from"./dashboardApi-G5c5_NBv.js";import{S as _e,N as be,C as ke}from"./carousel-BjsJOgE6.js";import"./index.esm-CeDA535l.js";import{_ as K}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./productApi-CvS1Xinv.js";import"./blankProductTypeEnum-7RSz3x1u.js";import"./images-BYfPj0sx.js";const ye=["src"],we=A({__name:"RecentOrders",setup(C){const o=z([]),h=new ve,r={size:5,current:1};return h.shopapiOrderPage(r).then(n=>{n.data.records&&(console.log("res.data.records...",n.data.records),o.push(...n.data.records))}),(n,d)=>{const s=le("perfect-scrollbar");return i(),b(s,{style:{height:"320px"}},{default:a(()=>[t(ie,{class:"text-no-wrap"},{default:a(()=>[d[0]||(d[0]=l("thead",null,[l("tr",null,[l("th",{class:"text-left text-subtitle-1"},"#Country"),l("th",{class:"text-left text-subtitle-1"},"Order No"),l("th",{class:"text-left text-subtitle-1"},"Name"),l("th",{class:"text-left text-subtitle-1"},"Creating Date")])],-1)),l("tbody",null,[(i(!0),v(k,null,x(o,e=>(i(),v("tr",{key:e.name},[l("td",null,[l("img",{src:e.countryLogo,width:"30"},null,8,ye)]),l("td",null,T(e.orderNo),1),l("td",null,T(e.customerName),1),l("td",null,T(e.addDate),1)]))),128))])]),_:1})]),_:1})}}}),xe={class:"mt-4"},Ce={class:"carousel__item text-left w-100"},Q={__name:"ProductList",props:{productList:Array,activedImages:Array,title:String},setup(C){const o=C,h=p({itemsToShow:1,snapAlign:"center"}),r=p({700:{itemsToShow:3,snapAlign:"center"},1024:{itemsToShow:4,snapAlign:"center"},1450:{itemsToShow:4,snapAlign:"start"}});function n(d){o.productList[d.index].isFavorite=d.isFavorite}return(d,s)=>(i(),v("div",xe,[t(c(ke),{id:"gallery",class:"relatedCar",breakpoints:r.value,settings:h.value},{addons:a(()=>[t(c(be))]),default:a(()=>[(i(!0),v(k,null,x(o.productList,(e,m)=>(i(),b(c(_e),{key:m},{default:a(()=>[l("div",Ce,[t(ge,{id:e.id,index:m,name:e.model,price:e.price,favorablePrice:e.favorablePrice,mainShowImageUrl:e.mainShowImageUrl,suspendImageUrl:e.suspendImageUrl,productionTimeMin:e.productionTimeMin,productionTimeMax:e.productionTimeMax,productionTimeUnit:e.productionTimeUnit,skuOption1:e.skuOption1,skuOption1Num:e.skuOption1Num,skuOption2:e.skuOption2,skuOption2Num:e.skuOption2Num,skuOption3:e.skuOption3,skuOption3Num:e.skuOption3Num,isFavorite:e.isFavorite,type:e.type,onChangeFavorite:n},null,8,["id","index","name","price","favorablePrice","mainShowImageUrl","suspendImageUrl","productionTimeMin","productionTimeMax","productionTimeUnit","skuOption1","skuOption1Num","skuOption2","skuOption2Num","skuOption3","skuOption3Num","isFavorite","type"])])]),_:2},1024))),128))]),_:1},8,["breakpoints","settings"])]))}},Ie={key:0},Ue={class:"mt-2 dashboard-check"},Le=A({__name:"LetsGetStarted",props:{statisticsInfo:Object},setup(C){const o=C,h=p(0);let r=p(!1);p(!0),p(!1),p(!1),p(!1),p(!1);const n=D();let d=p({socialImage:"",socialUrl:""});ne(()=>o.statisticsInfo,m=>{console.log("props.statisticsInfo....",m),m.haveSignUp&&(h.value+=1),m.haveFavoriteBlankProduct&&(h.value+=1),m.haveCustomProduct&&(h.value+=1),m.haveOrder&&(h.value+=1),m.haveConnectShop&&(h.value+=1)});function s(){window.open(d.value.socialUrl)}function e(){n.dashboardConfig({}).then(m=>{d.value=m.data})}return e(),(m,u)=>h.value==5||c(r)?(i(),v("div",Ie,[t(M,{src:c(d).socialImage,class:"w-100",inline:!0,style:{height:"315px"},srcset:"",rounded:10,alt:"",onClick:s},null,8,["src"])])):(i(),b(O,{key:1,variant:"outlined",class:"overflow-hidden bg-white",style:{"background-color":"white"}},{default:a(()=>[t(V,null,{default:a(()=>[t(J,{class:"d-flex align-center mb-3"},{default:a(()=>[u[7]||(u[7]=l("h3",{class:"font-weight-medium me-auto"},"Let's get Started !",-1)),t(J,{class:"text-medium-emphasis cursor-pointer more",onClick:u[0]||(u[0]=f=>j(r)?r.value=!c(r):r=!c(r))},{default:a(()=>u[6]||(u[6]=[U(" Dismiss ")])),_:1})]),_:1}),t(E),l("div",Ue,[t(S,{color:"primary",disabled:"",modelValue:o.statisticsInfo.haveSignUp,"onUpdate:modelValue":u[1]||(u[1]=f=>o.statisticsInfo.haveSignUp=f),"hide-details":"",class:"dis-check",readonly:""},{label:a(()=>[l("span",{style:N([{color:"#000 !important"},{"text-decoration":o.statisticsInfo.haveSignUp?"line-through":"none"}])}," Sign up for JetPrint ",4)]),_:1},8,["modelValue"]),t(S,{color:"primary",disabled:"",modelValue:o.statisticsInfo.haveFavoriteBlankProduct,"onUpdate:modelValue":u[2]||(u[2]=f=>o.statisticsInfo.haveFavoriteBlankProduct=f),"hide-details":"",readonly:""},{label:a(()=>[l("span",{style:N({"text-decoration":o.statisticsInfo.haveFavoriteBlankProduct?"line-through":"none"})}," Collect Your Liked Products ",4)]),_:1},8,["modelValue"]),t(S,{color:"primary",disabled:"",modelValue:o.statisticsInfo.haveCustomProduct,"onUpdate:modelValue":u[3]||(u[3]=f=>o.statisticsInfo.haveCustomProduct=f),"hide-details":"",readonly:""},{label:a(()=>[l("span",{style:N({"text-decoration":o.statisticsInfo.haveCustomProduct?"line-through":"none"})}," Complete 1 Designed Products ",4)]),_:1},8,["modelValue"]),t(S,{color:"primary",disabled:"",modelValue:o.statisticsInfo.haveOrder,"onUpdate:modelValue":u[4]||(u[4]=f=>o.statisticsInfo.haveOrder=f),"hide-details":"",readonly:""},{label:a(()=>[l("span",{style:N({"text-decoration":o.statisticsInfo.haveOrder?"line-through":"none"})}," Create An Order ",4)]),_:1},8,["modelValue"]),t(S,{color:"primary",disabled:"",modelValue:o.statisticsInfo.haveConnectShop,"onUpdate:modelValue":u[5]||(u[5]=f=>o.statisticsInfo.haveConnectShop=f),"hide-details":"",readonly:""},{label:a(()=>[l("span",{style:N({"text-decoration":o.statisticsInfo.haveConnectShop?"line-through":"none"})}," Connect To Your Store ",4)]),_:1},8,["modelValue"])]),t(E),t(W,{class:"mt-2 justify-space-between"},{default:a(()=>[(i(),v(k,null,x(5,(f,I)=>t(B,{cols:"2",lg:"2",sm:"12",style:{padding:"12px 0"},key:I},{default:a(()=>[l("div",{class:re(["divhr",I<h.value?"actived":""])},null,2)]),_:2},1024)),64))]),_:1})]),_:1})]),_:1}))}}),Se=K(Le,[["__scopeId","data-v-d8235640"]]),Ne={class:"mt-4"},Te=A({__name:"ActivityList",setup(C){let o=p([]);D().activityDashboardList().then(n=>{console.log("getActivityList...",n),o.value=n.data.itemList});function r(n){n.jumpUrl&&window.open(n.jumpUrl,"_blank")}return(n,d)=>(i(!0),v(k,null,x(c(o),(s,e)=>(i(),v("div",{key:e},[l("div",Ne,[t(O,{variant:"outlined",class:"overflow-hidden bg-white",style:{"background-color":"white"}},{default:a(()=>[t(V,null,{default:a(()=>[(i(!0),v(k,null,x(s.images,(m,u)=>(i(),b(M,{src:m.imageUrl,key:u,width:"100%",cover:"","max-height":"248",class:"mt-4 ml-2 mr-4",onClick:f=>r(m)},null,8,["src","onClick"]))),128)),t(H,{class:"pl-2 mt-4"},{default:a(()=>[U(T(s.title),1)]),_:2},1024),t(Q,{productList:s.products},null,8,["productList"])]),_:2},1024)]),_:2},1024)])]))),128))}}),Ve={class:"d-flex align-center"},Oe=["innerHTML"],De=["innerHTML"],Ae={class:"btns"},$e=A({__name:"NoticeDialog",emits:["onDate"],setup(C,{expose:o,emit:h}){let r=p(!1);de(),z({});let n=p([]),d=p({}),s=p(0);function e(I){n.value=I,d.value=I[s.value],r.value=!0}const m=()=>{r.value=!1};function u(){s.value<n.value.length-1&&(s.value=s.value+1,d.value=n.value[s.value])}function f(){s.value>0&&(s.value=s.value-1,d.value=n.value[s.value])}return o({openDialog:e,closeDialog:m}),(I,y)=>(i(),b(ce,{modelValue:c(r),"onUpdate:modelValue":y[1]||(y[1]=L=>j(r)?r.value=L:r=L),persistent:!0,"no-click-animation":!0,width:"50%"},{default:a(()=>[t(O,null,{default:a(()=>[t(V,{style:{"padding-top":"24px"}},{default:a(()=>[l("h3",Ve,[l("p",{innerHTML:c(d).title},null,8,Oe),t(M,{src:c(ue),width:32,height:32,class:"close",onClick:y[0]||(y[0]=L=>j(r)?r.value=!1:r=!1)},null,8,["src"])]),t(E,{class:"mt-6"}),l("p",{class:"mt-6",innerHTML:c(d).content},null,8,De),l("div",Ae,[t(Y,{class:"ml-auto mt-4",onClick:f,disabled:c(s)<=0},{default:a(()=>y[2]||(y[2]=[U("Previous")])),_:1},8,["disabled"]),t(Y,{class:"ml-auto mt-4",color:"primary",onClick:u,disabled:c(s)>=c(n).length-1},{default:a(()=>y[3]||(y[3]=[U("Next")])),_:1},8,["disabled"])])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}}),Pe={__name:"dashboardCarousel",setup(C){let o=p([]);function h(){D().dashboardCarousel({}).then(s=>{s.data&&(window.innerWidth>1040?s.data.forEach(e=>{e.imageUrl=e.imgUrl}):s.data.forEach(e=>{e.imageUrl=e.imgUrl2})),o.value=s.data}).catch(s=>{})}function r(d){window.open(d)}me(()=>{h()});let n=p("");return n.value=window.innerWidth,window.addEventListener("resize",function(d){n.value=window.innerWidth}),(d,s)=>(i(),v(k,null,[c(o).length>0&&c(n)<=760?(i(),b(q,{key:0,"show-arrows":!1,cycle:"","hide-delimiter-background":!0,interval:5e5,height:340,style:{"border-radius":"10px"}},{default:a(()=>[(i(!0),v(k,null,x(c(o),(e,m)=>(i(),b(Z,{key:m,onClick:u=>r(e.jumpUrl),src:e.imageUrl,style:{"border-radius":"10px"}},null,8,["onClick","src"]))),128))]),_:1})):X("",!0),c(o).length>0&&c(n)>760?(i(),b(q,{key:1,"show-arrows":!1,cycle:"","hide-delimiter-background":!0,interval:5e5,height:340,style:{"border-radius":"10px"}},{default:a(()=>[(i(!0),v(k,null,x(c(o),(e,m)=>(i(),b(Z,{key:m,onClick:u=>r(e.jumpUrl),src:e.imageUrl,height:340,cover:"",style:{"border-radius":"10px"}},null,8,["onClick","src"]))),128))]),_:1})):X("",!0)],64))}},Be={key:1},Me={class:"mt-4"},Fe=["src","onClick"],je=["onClick"],Ee=A({__name:"Index",setup(C){const o=pe(),h=he();let r=p({}),n=p(null),d=p(!1);z({current:1,size:10});const s=P(()=>(console.log("computed...",h.merchantInfoMutations),h.merchantInfoMutations.login)),e=P(()=>h.shouldDashboardNotice),m=P(()=>h.noticeList),u=P(()=>h.dashboardNoticeInterval);let f=p([]);function I(){d.value=!0,D().activityDashboardList({}).then(w=>{d.value=!1,f.value=w.data.itemList,console.log("activityList...",f.value)}).catch(w=>{d.value=!1})}function y(g){o.push("/activity?title="+g.handle)}function L(){o.push("/orders")}function ee(g){window.open(g)}function te(){if(console.log("shownotic...",e),!!s.value&&e.value){var g=u.value||60;h.SET_SHOULD_DASHBOARD_NOTICE_Mutations(!1);var w=localStorage.getItem("dashboardNoticeBeforeTime");if(w){const _=JSON.parse(w);if(console.log("距离弹出剩余分钟数..."),console.log((_-new Date().getTime())/60/1e3),_&&_>new Date().getTime())return}n.value.openDialog(m.value),localStorage.setItem("dashboardNoticeBeforeTime",new Date().getTime()+g*1e3*60)}}let G=p([]);function ae(){D().activityEntry({}).then(w=>{G.value=w.data})}function oe(g){window.open(g)}fe(()=>{I(),te(),ae()});let R=p("");return R.value=window.innerWidth,window.addEventListener("resize",function(g){R.value=window.innerWidth}),(g,w)=>(i(),v(k,null,[t($e,{ref_key:"refNoticeDialog",ref:n},null,512),s.value?(i(),v("div",Be,[t(Pe,{carouselList:g.carouselList},null,8,["carouselList"]),t(W,{class:"mt-2 clamore"},{default:a(()=>[(i(!0),v(k,null,x(c(G),(_,F)=>(i(),b(B,{lg:"4",cols:"12",style:{padding:"12px 24px"},key:F,onClick:$=>oe(_.jumpUrl)},{default:a(()=>[t(M,{src:_.imgUrl,width:"100%",rounded:"sm",cover:"",height:"180px"},null,8,["src"])]),_:2},1032,["onClick"]))),128))]),_:1}),t(W,null,{default:a(()=>[t(B,{cols:"12",lg:"8",sm:"12"},{default:a(()=>[t(O,{variant:"outlined",class:"overflow-hidden bg-white mt-4",style:{"background-color":"white"}},{default:a(()=>[t(V,null,{default:a(()=>[t(H,{class:"d-flex",style:{padding:"0"}},{default:a(()=>[w[0]||(w[0]=U("Recent Orders ")),l("div",{class:"ml-auto more",onClick:L},"View More")]),_:1}),t(we)]),_:1})]),_:1})]),_:1}),t(B,{cols:"12",lg:"4",sm:"12"},{default:a(()=>[l("div",Me,[t(Se,{statisticsInfo:c(r)},null,8,["statisticsInfo"])])]),_:1})]),_:1}),(i(!0),v(k,null,x(c(f),(_,F)=>(i(),b(O,{variant:"outlined",class:"overflow-hidden bg-white mt-4",style:{"background-color":"white"},key:F},{default:a(()=>[t(V,null,{default:a(()=>[(i(!0),v(k,null,x(_.images,($,se)=>(i(),v("div",{key:se,class:"pl-2"},[l("img",{src:$.imageUrl,width:"100%",height:"270px",style:{"object-fit":"cover","border-radius":"15px"},onClick:We=>ee($.jumpUrl)},null,8,Fe)]))),128)),t(H,{class:"d-flex mt-4 pl-2",style:{padding:"0"}},{default:a(()=>[U(T(_.title)+" ",1),l("div",{class:"ml-auto more",onClick:$=>y(_)},"View More",8,je)]),_:2},1024),t(Q,{productList:_.products,activedImages:_.images,title:"Picks from JetPrint"},null,8,["productList","activedImages"])]),_:2},1024)]),_:2},1024))),128))])):(i(),b(Te,{key:0}))],64))}}),Ke=K(Ee,[["__scopeId","data-v-e4892c21"]]);export{Ke as default};