1import{_ as S,d as U,o as j,c as N,n as O,w as E}from"./BL_iwhbQ.js";import{d as f,X as v,K as F,aq as b,ar as y,m as n,ah as C,F as L,Y as k,Z as u,af as i,ae as W,k as V,u as s,f as M,e as K}from"./BVpyO-BZ.js";import{_ as T}from"./BFbedP_d.js";import{_ as q}from"./D5BtVXaA.js";import{u as z,_ as R}from"./CdSqmweh.js";import{_ as X}from"./ChzbsbSN.js";import{k as Y,c as Z,K as G}from"./C7PLhKXe.js";import{C as H}from"./DZZcRgM-.js";import"./DnImIBm3.js";import"./C46zjNov.js";import"./BUjDCErj.js";import"./DXcmVafX.js";import"./jxzo36ZH.js";import"./k4skkZgS.js";import"./CR8mkQPC.js";import"./IT8abcad.js";import"./QternNd_.js";import"./Dy4eYe6k.js";const J=f({__name:"Icon",props:{loading:{type:Boolean,default:!1},isActive:{type:Boolean,default:!1},iconClass:{default:"h-6 w-6"},inactiveColor:{default:""},activeColor:{default:"text-app-primary h-7 w-7"}},setup(t){return(a,e)=>{const o=S;return v(),F(L,null,[b(n(o,{name:"i-heroicons-arrow-path",class:C([[t.iconClass,t.inactiveColor],"animate-spin"])},null,8,["class"]),[[y,t.loading]]),b(n(o,{name:t.isActive?"i-eko-heart-solid":"i-eko-heart",class:C([t.iconClass,t.isActive&&t.activeColor||t.inactiveColor])},null,8,["name","class"]),[[y,!t.loading]])],64)}}}),Q=Object.assign(J,{__name:"WishlistIcon"}),tt={class:"text-balck px-5 py-7.5 text-md"},ot={class:"absolute right-3 top-3"},et={class:"heading_style border-b border-app-gray-300 pb-1 font-secondary text-xl text-app-primary-500"},st={class:"py-2"},nt={class:"mb-9"},it=f({inheritAttrs:!1,__name:"Modal.client",setup(t,{expose:a}){const e=M(!1),o=()=>{e.value=!0},l=()=>{e.value=!1},c=()=>{l()};return a({openModal:o}),(r,p)=>{const _=U,m=q,d=j;return v(),k(d,{open:s(e),"onUpdate:open":p[0]||(p[0]=h=>V(e)?e.value=h:null),ui:{content:"sm:max-w-125"}},{content:u(()=>[i("div",tt,[i("div",ot,[n(_,{icon:"i-eko-close",color:"neutral",variant:"ghost",onClick:l})]),i("h2",et,W(r.$t("product.wishlist.add.new")),1),i("div",st,[i("p",nt,W(r.$t("product.wishlist.modal.sortTip")),1),n(m,{onOnSuccess:c})])])]),_:1},8,["open"])}}}),at=Object.assign(it,{__name:"ProductDetailsWishlistModal"}),lt=E(at),ct=f({__name:"Button.client",setup(t){const a=M(),{list:e,product:o}=Y(),{isInWishlist:l,wishlists:c,ensureWishlists:r}=z(e,o),{isLoading:p}=H(r,void 0,{immediate:!1}),{$url:_}=N(),{ensureAuthed:m}=Z(),{isMobile:d}=G(),h=async()=>{d.value&&await m(async()=>{await O(_.productWishlistSaveList(String(o.value?.id)))})},A=()=>{a.value?.openModal()},x=K(()=>c.value?.filter(g=>g.products?.some(w=>w.id===o.value?.id))?.length);return(g,w)=>{const B=Q,D=T,$=lt,P=R,I=X;return v(),k(I,{"popper-triggers":["click"],delay:{show:200,hide:0},distance:0,"auto-hide":!0,"popper-class":"wishlist-popover",placement:"bottom",disabled:s(d)},{default:u(()=>[n(D,{value:s(x),ui:{container:s(x)<2?"hidden":"flex items-center justify-center text-lg leading-none text-white pointer-events-none",position:"absolute -top-2.5 -right-4.5"}},{default:u(()=>[i("button",{type:"button","aria-label":"favorite button",class:"p-0 text-app-gray-300 hover:text-app-primary",onClick:h},[n(B,{"is-active":s(l),loading:s(p)},null,8,["is-active","loading"])])]),_:1},8,["value","ui"]),n($,{ref_key:"wishlistModalModalEl",ref:a},null,512)]),popper:u(()=>[n(P,{"product-id":s(o)?.id,lists:s(c),onAddNewWishlist:A},null,8,["product-id","lists"])]),_:1},8,["disabled"])}}}),At=Object.assign(ct,{__name:"ProductDetailsWishlistButton"});export{At as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.