import{av as V,aI as p,I as L,k as m,o,A as r,a as i,N as v,aJ as G,w as u,y as T,d as U,aB as $,e as A,aK as z,b as l,c as I,s as N,af as H,t as a,ae as Y,F as D,W as x,G as M,B as q}from"./index-CW_ph8U7.js";import{p as P}from"./productApi-DlDyLUoc.js";import{e as O}from"./blankProductTypeEnum-7RSz3x1u.js";import{I as w}from"./images-CEcXj5Ys.js";import{_ as E}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{N as R,S as W,C as j}from"./carousel-DLeEZZra.js";import"./index.esm-CeDA535l.js";const d="https://dashboard.jetprintapp.com",gt=V({id:"dashboard",state:()=>({}),actions:{async merchantIndexStatistics(s){return await p.post(`${d}/shopapi/merchant/index/statistics`,s)},async statisticsCustomProductNum(s){return await p.post(`${d}/shopapi/statistics/custom_product_num`,s)},async statisticsOrderAmount(s){return await p.post(`${d}/shopapi/statistics/order_amount`,s)},async statisticsOrderNum(s){return await p.post(`${d}/shopapi/statistics/order_num`,s)},async activityDashboardList(s){return await p.post(`${d}/shopapi/activity/dashboard/list`,s)},async activityDetail(s){return await p.post(`${d}/shopapi/activity/detail`,s)},async dashboardConfig(s){return await p.post(`${d}/shopapi/common/dashboardConfig`,s)}}}),J={key:0,class:"image-container"},K={class:"text-h4 pt-3",style:{height:"53px"}},Q={key:0,class:"d-flex align-center ga-2 mt-2"},X={class:"text-secondary text-h4"},Z={class:"text-decoration-line-through text-medium-emphasis ml-2 text-subtitle-2"},tt={key:1,class:"d-flex align-center ga-2 mt-2"},et={class:"text-secondary text-h4"},st={class:"text-medium-emphasis mt-2"},it={class:"mt-2"},ot={key:0},at={key:1},nt={key:2},rt=L({__name:"GoodsItem",props:{id:Number,index:Number,name:String,favorablePrice:Number,price:Number,mainShowImageUrl:String,suspendImageUrl:String,productionTimeMin:Number,productionTimeMax:Number,productionTimeUnit:Number,skuOption1:String,skuOption1Num:Number,skuOption2:String,skuOption2Num:Number,skuOption3:String,skuOption3Num:Number,isFavorite:Boolean,type:Number},emits:["changeFavorite"],setup(s,{emit:n}){const t=s;m(!1),m(t.rating);const h=m(""),f=n;m(!1);let c=m(!1);function S(y){c.value=!0,P().blankProductFavorite(y).then(b=>{c.value=!1;const _={index:t.index,isFavorite:!0};f("changeFavorite",_)})}function e(y){c.value=!0,P().blankProductUnFavorite(y).then(b=>{c.value=!1;const _={index:t.index,isFavorite:!1};f("changeFavorite",_)})}function g(){t.type==O.DIY.value?x.push({path:"/products/diyDetail",query:{id:t.id}}):x.push({path:"/products/detail",query:{id:t.id}})}function C(){t.type==O.DIY.value?h.value="products/diyDetail?id="+t.id:h.value="products/detail?id="+t.id}function F(){t.type==O.DIY.value?x.push("products/diyDetail?id="+t.id):x.push("products/detail?id="+t.id)}return(y,k)=>{const b=M("HeartFilledIcon"),_=M("router-link");return o(),r(D,null,[i(G,{isShow:v(c)},null,8,["isShow"]),i(Y,{variant:"flat",link:"",class:"rounded white overflow-hidden product-carousel"},{default:u(()=>[t.isFavorite?(o(),r("div",{key:0,class:"collect",onClick:k[0]||(k[0]=T(B=>e(t.id),["stop"]))},[i(U,{size:"small",icon:"",class:"ml-auto"},{default:u(()=>[i($,{activator:"parent",location:"top"},{default:u(()=>[A("Remove from My Favourite")]),_:1}),i(b,{color:"#EC407A"})]),_:1})])):(o(),r("div",{key:1,class:"collect",onClick:k[1]||(k[1]=T(B=>S(t.id),["stop"]))},[i(U,{size:"small",icon:"",class:"ml-auto"},{default:u(()=>[i($,{activator:"parent",location:"top"},{default:u(()=>[A("Add to My Favourite")]),_:1}),i(v(z),{color:"#828282"})]),_:1})])),l("div",{class:"card",onClick:g},[t.suspendImageUrl?(o(),r("div",J,[i(_,{to:h.value,class:"product",onClick:F,onContextmenu:C},{default:u(()=>[i(w,{url:t.mainShowImageUrl,classes:"w-100 product-img position-relative d-block",style:{"z-index":"1"}},null,8,["url"]),t.suspendImageUrl?(o(),I(w,{key:0,url:t.suspendImageUrl,classes:"w-100 product-img d-block"},null,8,["url"])):N("",!0)]),_:1},8,["to"])])):(o(),I(_,{key:1,to:h.value,class:"product",onClick:F,onContextmenu:C},{default:u(()=>[i(w,{url:t.mainShowImageUrl,classes:"w-100 d-block"},null,8,["url"])]),_:1},8,["to"])),i(H,null,{default:u(()=>[l("p",K,a(t.name),1),t.favorablePrice?(o(),r("p",Q,[l("span",X,"$"+a(t.favorablePrice),1),l("span",Z,a(t.price),1)])):(o(),r("p",tt,[l("span",et,"$"+a(t.price),1)])),l("p",st,"Avg.production time "+a(t.productionTimeMin)+" "+a(t.productionTimeUnit==1?"day":"week"),1),l("p",it,[t.skuOption1Num>0?(o(),r("span",ot,a(t.skuOption1Num)+" "+a(t.skuOption1),1)):N("",!0),t.skuOption2Num>0?(o(),r("span",at," · "+a(t.skuOption2Num)+" "+a(t.skuOption2),1)):N("",!0),t.skuOption3Num>0?(o(),r("span",nt," · "+a(t.skuOption3Num)+" "+a(t.skuOption3),1)):N("",!0)])]),_:1})])]),_:1})],64)}}}),ut=E(rt,[["__scopeId","data-v-3b104566"]]),ct={class:"mt-4"},lt={class:"carousel__item text-left w-100"},pt={__name:"ProductList",props:{productList:Array,activedImages:Array,title:String},setup(s){const n=s,t=m({itemsToShow:1,snapAlign:"center"}),h=m({700:{itemsToShow:3,snapAlign:"center"},1024:{itemsToShow:4,snapAlign:"center"},1450:{itemsToShow:4,snapAlign:"start"}});function f(c){n.productList[c.index].isFavorite=c.isFavorite}return(c,S)=>(o(),r("div",ct,[i(v(j),{id:"gallery",class:"relatedCar",breakpoints:h.value,settings:t.value},{addons:u(()=>[i(v(R))]),default:u(()=>[(o(!0),r(D,null,q(n.productList,(e,g)=>(o(),I(v(W),{key:g},{default:u(()=>[l("div",lt,[i(ut,{id:e.id,index:g,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:f},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"])]))}},yt=pt;export{ut as G,yt as P,gt as d};