import{_ as s}from"./XQnr5WFw.js";import{_ as a}from"./Dux3niWr.js";import{d as t,a as l,i as e}from"./u7I9BgvO.js";import{L as i,M as o,G as r,O as d,$ as c,H as n,r as m,c as p,a2 as u,W as h,u as f,V as x,P as g,Z as b,a1 as w}from"./BCDZ6bul.js";import{_ as v}from"./XH89fbpA.js";import{_ as y}from"./CFg7FNs1.js";import{_}from"./B8Kx3ZW0.js";import{_ as j}from"./t_btr7io.js";import"./mqjJGHgV.js";const k={class:"grid grid-cols-2 md:grid-cols-2 xl:grid-cols-3 gap-4"};const N=t({},[["render",function(s,t){const l=a;return i(),o("div",k,[(i(),o(r,null,d(6,(s=>c("div",{key:s,class:"space-y-4"},[n(l,{class:"h-[280px] sm:h-[320px] w-[100%]"}),n(l,{class:"h-[14px] w-[70%]"}),n(l,{class:"h-[14px] w-[40%]"}),n(l,{class:"h-[14px] w-[50%]"})]))),64))])}]]),z={class:"bg-[#F6F7FC] p-3 md:p-6 h-fit"},C={class:"font-bold text-xl lg:mb-10 mb-6"},E={key:1},L={key:0,class:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-2 xl:grid-cols-3 gap-2"},$={class:"relative"},S=["disabled"],F={__name:"wishlist",setup(a){const t=m({wishlistName:""}),k=p(!1),F=l().$axios,{data:I,status:P,refresh:T}=e("faves",(()=>F("get_fave_products").then((s=>s.data.data)).catch((s=>s.response.data))));return(a,l)=>{const e=s,m=N,p=v,F=y,T=_,O=j;return i(),o("div",z,[c("h3",C,u(a.$t("TITLES.wishlist")),1),h("",!0),"pending"===f(P)?(i(),o("div",E,[n(m)])):"success"===f(P)?(i(),o(r,{key:2},[f(I)&&f(I).length?(i(),o("div",L,[(i(!0),o(r,null,d(f(I),(s=>(i(),x(p,{key:s.id,product:s},null,8,["product"])))),128))])):(i(),x(F,{key:1,class:"!min-h-[320px]"}))],64)):h("",!0),(i(),x(b,{to:"body"},[f(k)?(i(),x(O,{key:0,onClose:l[4]||(l[4]=s=>k.value=!1)},{default:g((()=>[c("div",{onClick:l[3]||(l[3]=w((()=>{}),["stop"])),class:"bg-white w-[540px] max-h-[95%] overflow-y-auto max-w-[90%] py-6 lg:py-10 px-4 lg:px-8","data-aos":"zoom-in","data-aos-duration":"800"},[c("div",$,[l[7]||(l[7]=c("h4",{class:"text-3xl capitalize text-center mb-10 font-bold"}," Create a wishlist ",-1)),c("button",{class:"absolute size-12 top-1/2 border border-[#E1E1E1] flex items-center justify-center rounded-full -translate-y-1/2 end-0",onClick:l[1]||(l[1]=s=>k.value=!1)},[n(e,{name:"close-2"})])]),n(T,{name:"wishlistName",label:a.$t("LABELS.wishlistName"),placeholder:a.$t("INPUTS.wishlistName"),value:f(t).wishlistName,"onUpdate:value":l[2]||(l[2]=s=>f(t).wishlistName=s)},null,8,["label","placeholder","value"]),c("button",{disabled:!f(t).wishlistName,class:"base-btn mt-10 w-full capitalize !h-14"}," Save Wishlist ",8,S)])])),_:1})):h("",!0)]))])}}};export{F as default};
