import{_ as s}from"./O8XzS9XJ.js";import{d as e,b as a,a as t,i as l}from"./BFs-V2bs.js";import{L as i,M as r,G as o,O as c,$ as n,H as d,c as p,a2 as g,u as m,W as u,V as v,P as x,Z as h}from"./BCDZ6bul.js";import{_ as f}from"./CzKA6Ujf.js";import{_ as w}from"./BeqIgQI7.js";import{_ as y,a as k}from"./mqjJGHgV.js";import"./C4aQrNYF.js";const b={class:"grid grid-cols-1 gap-8"},j={class:"flex flex-col space-y-6 w-full"},E={class:"flex items-center gap-2 justify-between"};const _=e({},[["render",function(e,a){const t=s;return i(),r("div",b,[(i(),r(o,null,c(4,(s=>n("div",{key:s,class:"flex items-start bg-white p-4 lg:p-6 border-[#E1E1E1] border gap-4"},[d(t,{class:"h-[80px] w-[80px] flex-shrink-0"}),n("div",j,[d(t,{class:"h-[28px] w-[150px]"}),n("div",E,[d(t,{class:"h-[28px] w-[120px]"}),d(t,{class:"h-[28px] w-[38px]"})])])]))),64))])}]]),z={class:"bg-[#F6F7FC] py-6 lg:py-10 px-2 lg:px-14 h-fit"},C={class:"font-bold text-3xl lg:mb-12 mb-6"},T={key:0},$={key:1},L={key:1,class:"space-y-4 lg:space-y-8 lg:mt-10"},I={class:"flex-shrink-0"},F=["src"],M={class:"w-full"},S={class:"flex items-center gap-2 justify-between mb-4"},P={class:"font-medium text-lg line-clamp-1"},B={class:"flex items-center gap-2 justify-between"},D={class:"!text-sm lg:!text-lg font-medium text-[##03030]"},G={class:"flex lg:hidden items-center gap-2"},H={class:"font-medium text-lg"},O={class:"hidden lg:flex items-center gap-2"},R={key:0,src:y,alt:"star",class:"w-6 h-6"},V={key:1,src:k,alt:"star",class:"w-6 h-6"},W={key:1,class:"flex gap-4 mt-4 items-center flex-wrap"},Z=["src"],q=["onClick"],A={key:2},J=["src"],K={__name:"my-reviews",setup(s){a();const e=t().$axios,{data:k,status:b}=l("my-reviews",(()=>e("review").then((s=>s.data)).catch((s=>s))));const j=p(!1),E=p(null);return(s,e)=>{var a;const t=_,l=f,p=w;return i(),r("div",z,[n("h3",C,g(s.$t("TITLES.my_reviews")),1),"pending"===m(b)?(i(),r("div",T,[d(t)])):"success"===m(b)?(i(),r("div",$,[u("",!0),m(k).data&&m(k).data.length?(i(),r("div",L,[(i(!0),r(o,null,c(null==(a=m(k))?void 0:a.data,((a,t)=>{var l,d;return i(),r("div",{"data-aos":"fade-up",key:t,class:"border flex gap-x-2.5 lg:gap-x-8 gap-y-6 bg-white border-[#E1E1E1] p-4 lg:p-6"},[n("div",I,[n("img",{src:null==(l=a.image)?void 0:l.media,alt:"star",width:"160",height:"160",class:"size-20 lg:size-40 object-cover"},null,8,F)]),n("div",M,[n("div",S,[n("p",P,g(a.title),1)]),u("",!0),n("div",B,[n("div",D,g(s.$t("TITLES.price"))+": "+g(s.$n(+a.price))+" "+g(s.$t("TITLES.egp")),1),n("div",G,[e[8]||(e[8]=n("img",{src:y,alt:"star",class:"w-5 h-5"},null,-1)),n("span",H,g((null==a?void 0:a.rate)??"0"),1)]),n("div",O,[(i(),r(o,null,c(5,(s=>n("span",{key:s,class:"cursor-pointer flex-shrink-0 transition duration-300 hover:scale-110"},[s<=a.rate?(i(),r("img",R)):(i(),r("img",V))]))),64))])]),(null==(d=a.images)?void 0:d.length)?(i(),r("div",W,[(i(!0),r(o,null,c(a.images,(s=>(i(),r("div",{class:"relative group",key:s},[n("img",{src:s,alt:"star",width:"120",height:"120",class:"w-[120px] h-[120px] object-cover"},null,8,Z),n("button",{onClick:e=>function(s){j.value=!0,E.value=s}(s),class:"absolute left-1/2 top-1/2 z-10 -translate-x-1/2 -translate-y-1/2 rounded-full bg-white p-3 opacity-0 transition-all group-hover:opacity-100 hover:bg-gray-100"},e[9]||(e[9]=[n("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[n("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),n("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})],-1)]),8,q)])))),128))])):u("",!0)])])})),128))])):(i(),r("div",A,[d(l,{class:"!min-h-[320px]"})]))])):u("",!0),(i(),v(h,{custom:"",to:"body"},[m(j)?(i(),v(p,{key:0,onClose:e[0]||(e[0]=s=>j.value=!1)},{default:x((()=>[n("img",{src:m(E),"data-aos":"zoom-in","data-aos-duration":"800",alt:"review image",class:"max-h-[90%] max-w-[90%] object-cover"},null,8,J)])),_:1})):u("",!0)]))])}}};export{K as default};
