import{_ as O}from"./myImg-DfWaL93x.js";import{d as Q,B as _,a as V,s as W,r as p,c as X,z as Y,g as v,h as o,i,w as r,j as e,m as g,l as b,F as A,C as K,W as $,J as Z,x as C,q as ee,aj as te,b as oe,f as c,S as F,T as N,D as B,G as P,ak as se,L as ae,k as m,t as u,_ as ie}from"./index-LX-5rALE.js";import{s as re,u as ne}from"./product-oo2nVtPg.js";import{V as le}from"./VHover-D-INpnYU.js";import{V as R}from"./VTooltip-DlwLvgeO.js";import{V as ce}from"./VChip-BGcYkRzt.js";import"./VRow-Cb28_O-Q.js";/* empty css              */import"./VCol-D0s5AJIV.js";import"./VSlideGroup-gvVX_Ab-.js";const ue={class:"position-relative top-img-box"},de={key:0},pe={key:0,class:"d-flex v-card--reveal",style:{width:"250%",height:"32px","text-align":"center","line-height":"0"}},me={class:"img-top-right-collect position-absolute"},ve={class:"img-top-right-quick-view position-absolute"},fe={class:"quick-view-btn"},he={class:"product-info-bottom-content"},_e={class:"d-flex",style:{"min-height":"24px"}},ge={class:"product-title mt-3 text-truncate"},be={class:"product-describe text-truncate mt-1"},ke={class:"product-title mt-2"},xe={key:0,class:"text-decoration-line-through ml-4"},ye=["innerHTML"],we={class:"d-flex mt-5 justify-space-between align-center"},Ce={key:0,class:"btn-cancel d-flex",style:{width:"100%"}},Ie={class:"d-inline-block text-truncate"},Se=Q({__name:"productItem",props:["productDetailsItemData"],emits:["update:quickViewItem"],setup(q,{emit:L}){_.DP=2;const M=q,T=L,I=V(),S=W(),t=p(M.productDetailsItemData),j=ee(),z=oe();p(j.query.id);const k=I.$state.userBaseInfo.currentShop.shopType,x=p(!1),U=()=>{x.value=!t.value.favorite,t.value.favorite=x.value,x.value?re({blankProductId:t.value.id}).then(l=>{S.changeSnackbar({color:"#7367F0",location:"top end",variant:"elevated",text:"Collection Successful !",visible:!0})}):ne({blankProductId:t.value.id}).then(l=>{S.changeSnackbar({color:"#7367f0",location:"top end",variant:"elevated",text:"Cancel Collection !",visible:!0})})},E=l=>{T("update:quickViewItem",l)},H=X(),D=l=>{if(!I.getUserBaseInfo.login){H.changeVisible(!0);return}z.push({name:"products-calog-distribution",query:{id:l}})};p(!0),p(!1);const y=Y(()=>l=>{const s=localStorage.getItem("ChooseCurrency"),d=JSON.parse(s),a=V().$state.currentData,n=p(0),w=l||0;return a.currencyRate?(n.value=new _(w).times(a.currencyRate).toNumber(),`${a.name} ${n.value}`):d&&d.currencyRate?(n.value=new _(w).times(d.currencyRate).toNumber(),`${d.name} ${n.value}`):(n.value=new _(w).times(1).toNumber(),`$ ${n.value}`)}),f=p(!1),J=()=>{t.value.suspendImageUrl&&(f.value=!0)},G=()=>{f.value=!1};return(l,s)=>{const d=O,h=te("RouterLink");return c(),v("div",{class:"product-info-item-box cursor-pointer mb-5",onMouseenter:J,onMouseleave:G},[o("div",ue,[i(h,{to:`/products/${e(t).handle}`},{default:r(()=>[F(o("div",null,[i(d,{src:e(t).mainShowImageUrl,width:612,height:612,"no-compress":!0},null,8,["src"])],512),[[N,!e(f)]]),F(o("div",null,[i(d,{src:e(t).suspendImageUrl,width:612,height:612,"no-compress":!0},null,8,["src"])],512),[[N,e(f)]])]),_:1},8,["to"]),e(t).customizable?(c(),v("div",de,[i(le,null,{default:r(({isHovering:a,props:n})=>[o("div",B({class:"img-top-left-label position-absolute d-flex justify-center align-center"},n),[i(P,{icon:"custom-quill-pen-fill",color:"#3C4056"}),i(se,null,{default:r(()=>[a?(c(),v("div",pe," Support DIY ")):g("",!0)]),_:2},1024)],16)]),_:1})])):g("",!0),o("div",me,[i(R,{text:e(t).favorite?"Remove Favorited":"Favorites"},{activator:r(({props:a})=>[i(P,B(a,{icon:e(t).favorite?"custom-heart-fill":"custom-heart-line",color:e(t).favorite?"#FF4D49":"#3C4056",onClick:ae(U,["stop"])}),null,16,["icon","color"])]),_:1},8,["text"])]),o("div",ve,[o("div",fe,[i(b,{variant:"outlined",color:"#3B4055",height:"42px",block:"",onClick:s[0]||(s[0]=a=>E(e(t).id))},{default:r(()=>s[3]||(s[3]=[m(" Quick View ")])),_:1,__:[3]})])])]),o("div",he,[o("div",_e,[(c(!0),v(A,null,K(e(t).labels,(a,n)=>(c(),C(ce,{key:n,style:$({"--label-color":a.bgColor,"--font-color":a.fontColor}),class:"mr-2 font-weight-medium rounded-pill chip-item-bg",size:"small"},{default:r(()=>[m(u(a.name),1)]),_:2},1032,["style"]))),128))]),i(h,{to:`/products/${e(t).handle}`},{default:r(()=>[o("div",null,[o("div",ge,[m(u(e(t).fullName)+" ",1),i(R,{activator:"parent",location:"top"},{default:r(()=>[m(u(e(t).fullName),1)]),_:1})]),o("div",be,u(e(t).optionInfo),1),o("div",ke,[m(" From "+u(e(t).favorablePrice?e(y)(e(t).favorablePrice):e(y)(e(t).price))+" ",1),e(t).favorablePrice?(c(),v("span",xe,u(e(t).price>0?"From ":"")+" "+u(e(t).price>0?e(y)(e(t).price):""),1)):g("",!0)]),o("div",{class:"product-describe mt-1",innerHTML:e(t).blankContent},null,8,ye)])]),_:1},8,["to"]),o("div",we,[o("div",{class:Z(["btn-cancel",e(k)===2?"":"mr-2"]),style:$({width:(e(k)===2,"100%")})},[i(h,{to:`/products/${e(t).handle}`},{default:r(()=>[i(b,{variant:"flat",color:"#000000",height:"42px",block:""},{default:r(()=>s[4]||(s[4]=[m(" Sample ")])),_:1,__:[4]})]),_:1},8,["to"])],6),e(k)!==2?(c(),v("div",Ce,[e(t).dropshiped?(c(),C(b,{key:1,variant:"outlined",color:"#6D788D",height:"42px",onClick:s[2]||(s[2]=a=>D(e(t).id)),block:""},{default:r(()=>s[5]||(s[5]=[m(" Re-listing ")])),_:1,__:[5]})):(c(),C(b,{key:0,variant:"flat",color:"#000000",height:"42px",onClick:s[1]||(s[1]=a=>D(e(t).id)),block:""},{default:r(()=>[o("div",Ie," Dropship it ("+u(e(t).skuNum)+" sku) ",1)]),_:1}))])):g("",!0)])])],32)}}}),Me=ie(Se,[["__scopeId","data-v-37593333"]]);export{Me as default};