import{_ as s}from"./CvinhXDy.js";import{d as a,b as e,a as t,i as l}from"./Co1-PnRw.js";import{L as r,M as i,G as o,O as c,$ as n,H as d,c as p,a2 as u,u as m,W as x,V as g,P as v,Z as h}from"./DOfEu912.js";import{_ as w}from"./DVpzosRw.js";import{_ as f}from"./DVxWgENy.js";import{_ as y,a as k}from"./mqjJGHgV.js";import"./qEUZcQ07.js";const b={class:"grid grid-cols-1 gap-8"},j={class:"flex flex-col space-y-4 w-full"};const _=a({},[["render",function(a,e){const t=s;return r(),i("div",b,[(r(),i(o,null,c(4,(s=>n("div",{key:s,class:"flex items-start bg-white p-6 shadow-md rounded-lg gap-4"},[d(t,{class:"h-[80px] w-[80px] rounded-md"}),n("div",j,[d(t,{class:"h-[24px] w-[150px]"}),d(t,{class:"h-[16px] w-[200px]"}),d(t,{class:"h-[14px] w-[250px]"}),d(t,{class:"h-[16px] w-[80px]"}),d(t,{class:"h-[16px] w-[120px]"})])]))),64))])}]]),C={class:"bg-[#F6F7FC] py-6 lg:py-10 px-2 lg:px-14 h-fit"},E={class:"font-bold text-3xl mb-12"},T={key:0},$={key:1},z={key:1,class:"space-y-8 mt-10"},L=["src"],F={class:"w-full"},I={class:"flex items-center justify-between mb-4"},M={class:"font-medium text-lg"},S={class:"flex items-center gap-1"},G={key:0,src:y,alt:"star",class:"w-6 h-6"},P={key:1,src:k,alt:"star",class:"w-6 h-6"},B={class:"text-lg font-medium text-[##03030]"},H={key:1,class:"flex gap-4 mt-6 items-center flex-wrap"},J=["src"],N=["onClick"],O={key:2},V=["src"],W={__name:"my-reviews",setup(s){e();const a=t().$axios,{data:y,status:k}=l("my-reviews",(()=>a("review").then((s=>s.data)).catch((s=>s))));const b=p(!1),j=p(null);return(s,a)=>{var e;const t=_,l=w,p=f;return r(),i("div",C,[n("h3",E,u(s.$t("TITLES.my_reviews")),1),"pending"===m(k)?(r(),i("div",T,[d(t)])):"success"===m(k)?(r(),i("div",$,[x("",!0),m(y).data&&m(y).data.length?(r(),i("div",z,[(r(!0),i(o,null,c(null==(e=m(y))?void 0:e.data,((e,t)=>{var l,d;return r(),i("div",{"data-aos":"fade-up",key:t,class:"border flex gap-x-8 gap-y-6 bg-white border-[#E1E1E1] p-6"},[n("div",null,[n("img",{src:null==(l=e.image)?void 0:l.media,alt:"star",width:"160",height:"160",class:"w-[160px] h-[160px] object-cover"},null,8,L)]),n("div",F,[n("div",I,[n("p",M,u(e.title),1),n("div",S,[(r(),i(o,null,c(5,(s=>n("span",{key:s,class:"cursor-pointer transition duration-300 hover:scale-110"},[s<=e.rate?(r(),i("img",G)):(r(),i("img",P))]))),64))])]),x("",!0),n("div",B,u(s.$t("TITLES.price"))+": "+u(s.$n(+e.price))+" "+u(s.$t("TITLES.egp")),1),(null==(d=e.images)?void 0:d.length)?(r(),i("div",H,[(r(!0),i(o,null,c(e.images,(s=>(r(),i("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,J),n("button",{onClick:a=>function(s){b.value=!0,j.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"},a[8]||(a[8]=[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,N)])))),128))])):x("",!0)])])})),128))])):(r(),i("div",O,[d(l,{class:"!min-h-[300px]"})]))])):x("",!0),(r(),g(h,{custom:"",to:"body"},[m(b)?(r(),g(p,{key:0,onClose:a[0]||(a[0]=s=>b.value=!1)},{default:v((()=>[n("img",{src:m(j),"data-aos":"zoom-in","data-aos-duration":"800",alt:"review image",class:"max-h-[90%] max-w-[90%] object-cover"},null,8,V)])),_:1})):x("",!0)]))])}}};export{W as default};
