import{_ as O}from"./myImg-B3XMH9SK.js";import{d as Q,a as V,s as W,r as p,c as X,z as Y,B as C,g as v,h as o,i,w as r,j as e,m as _,l as g,F as A,C as K,W as $,J as Z,x as w,q as ee,aj as te,b as oe,f as c,S as F,T as N,D as B,G as R,ak as se,L as ae,k as m,t as u,_ as ie}from"./index-N7CMQwFv.js";import{s as re,u as ne}from"./product-C59H-sk9.js";import{V as le}from"./VHover-p5R94ZLu.js";import{V as q}from"./VTooltip-Ap2rzsdn.js";import{V as ce}from"./VChip-iaVLrPY0.js";import"./VRow-CGgRlzLk.js";/* empty css */import"./VCol-xRADuXqd.js";import"./VSlideGroup-BGEgBoXK.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-2"},ke={class:"product-title mt-2"},xe={key:0,class:"text-decoration-line-through ml-4"},ye=["innerHTML"],Ce={class:"d-flex mt-5 justify-space-between align-center"},we={key:0,class:"btn-cancel",style:{width:"100%"}},Ie={class:"d-inline-block text-truncate"},Se=Q({__name:"productItem",props:["productDetailsItemData"],emits:["update:quickViewItem"],setup(P,{emit:L}){const M=P,T=L,I=V(),S=W(),t=p(M.productDetailsItemData),j=ee(),z=oe();p(j.query.id);const b=I.$state.userBaseInfo.currentShop.shopType,k=p(!1),U=()=>{k.value=!t.value.favorite,t.value.favorite=k.value,k.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 x=Y(()=>l=>{const s=localStorage.getItem("ChooseCurrency"),d=JSON.parse(s),a=V().$state.currentData,n=p(0),y=l||0;return a.currencyRate?(n.value=new C(y).times(a.currencyRate).toNumber(),`${a.name} ${n.value}`):d&&d.currencyRate?(n.value=new C(y).times(d.currencyRate).toNumber(),`${d.name} ${n.value}`):(n.value=new C(y).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:`/productsCalog/${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(R,{icon:"custom-quill-pen-fill",color:"#3C4056"}),i(se,null,{default:r(()=>[a?(c(),v("div",pe," Support DIY ")):_("",!0)]),_:2},1024)],16)]),_:1})])):_("",!0),o("div",me,[i(q,{text:e(t).favorite?"Remove Favorited":"Favorites"},{activator:r(({props:a})=>[i(R,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(g,{variant:"text",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(),w(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:`/productsCalog/${e(t).handle}`},{default:r(()=>[o("div",null,[o("div",ge,[m(u(e(t).fullName)+" ",1),i(q,{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(x)(e(t).favorablePrice):e(x)(e(t).price))+" ",1),e(t).favorablePrice?(c(),v("span",xe,u(e(t).price>0?"From ":"")+" "+u(e(t).price>0?e(x)(e(t).price):""),1)):_("",!0)]),o("div",{class:"product-describe mt-2",innerHTML:e(t).blankContent},null,8,ye)])]),_:1},8,["to"]),o("div",Ce,[o("div",{class:Z(["btn-cancel",e(b)===2?"":"mr-2"]),style:$({width:(e(b)===2,"100%")})},[i(h,{to:`/productsCalog/${e(t).handle}`},{default:r(()=>[i(g,{variant:"outlined",color:"#6D788D",height:"42px",block:""},{default:r(()=>s[4]||(s[4]=[m(" Sample ")])),_:1,__:[4]})]),_:1},8,["to"])],6),e(b)!==2?(c(),v("div",we,[e(t).dropshiped?(c(),w(g,{key:1,variant:"outlined",color:"#6D788D",height:"42px",block:"",class:"text-truncate",onClick:s[2]||(s[2]=a=>D(e(t).id))},{default:r(()=>s[5]||(s[5]=[m(" Re-listing ")])),_:1,__:[5]})):(c(),w(g,{key:0,variant:"flat",color:"#000000",height:"42px",block:"",onClick:s[1]||(s[1]=a=>D(e(t).id))},{default:r(()=>[o("div",Ie," Dropship it ("+u(e(t).skuNum)+" sku) ",1)]),_:1}))])):_("",!0)])])],32)}}}),Me=ie(Se,[["__scopeId","data-v-f0cacf3d"]]);export{Me as default};