import{_ as s}from"./Y_khhB8y.js";import{_ as a}from"./CY0PhNnd.js";import{d as t,a as l,i as e}from"./BSPiLQQh.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 g,P as x,Z as w,a1 as b}from"./DOfEu912.js";import{_ as v}from"./ePq4oHZv.js";import{_ as y}from"./DiBeIwOS.js";import{_}from"./DOduyvay.js";import{_ as j}from"./hbZL9CJp.js";import"./mqjJGHgV.js";const k={class:"grid grid-cols-1 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-[300px] w-[100%] rounded-md"}),n(l,{class:"h-[14px] w-[70%]"}),n(l,{class:"h-[14px] w-[40%]"}),n(l,{class:"h-[14px] w-[50%]"})]))),64))])}]]),C={class:"bg-[#F6F7FC] p-3 md:p-6 h-fit"},E={class:"font-bold text-xl mb-10"},$={key:1},z={key:0,class:"grid grid-cols-1 xs:grid-cols-2 md:grid-cols-3 lg:grid-cols-2 xl:grid-cols-3 gap-2 md:gap-4"},L={class:"relative"},S=["disabled"],F={__name:"wishlist",setup(a){const t=m({wishlistName:""}),k=p(!1),F=l().$axios,{data:T,status:H,refresh:I}=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,I=_,O=j;return i(),o("div",C,[c("h3",E,u(a.$t("TITLES.wishlist")),1),h("",!0),"pending"===f(H)?(i(),o("div",$,[n(m)])):"success"===f(H)?(i(),o(r,{key:2},[f(T)&&f(T).length?(i(),o("div",z,[(i(!0),o(r,null,d(f(T),(s=>(i(),g(p,{key:s.id,product:s},null,8,["product"])))),128))])):(i(),g(F,{key:1,class:"!min-h-[300px]"}))],64)):h("",!0),(i(),g(w,{to:"body"},[f(k)?(i(),g(O,{key:0,onClose:l[4]||(l[4]=s=>k.value=!1)},{default:x((()=>[c("div",{onClick:l[3]||(l[3]=b((()=>{}),["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,[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(I,{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};
