import{_ as s}from"./Blo9Icj0.js";import{f as e,d as a,u as t,c as l,a as i,e as r}from"./ChySj7jw.js";import{L as o,M as n,F as c,O as d,$ as p,x as u,f as m,c as g,a2 as v,u as x,W as f,V as h,P as w,Z as y}from"./CFGNYEIb.js";import{_ as k}from"./BBjW4az_.js";import{_ as b}from"./vmluQHf5.js";import{_ as j,a as _}from"./mqjJGHgV.js";import"./Dx2CeTMm.js";const E={class:"grid grid-cols-1 gap-8"},z={class:"flex flex-col space-y-6 w-full"},C={class:"flex items-center gap-2 justify-between"};const $=e({},[["render",function(e,a){const t=s;return o(),n("div",E,[(o(),n(c,null,d(4,(s=>p("div",{key:s,class:"flex items-start bg-white p-4 lg:p-6 border-[#E1E1E1] border gap-4"},[u(t,{class:"h-[80px] w-[80px] flex-shrink-0"}),p("div",z,[u(t,{class:"h-[28px] w-[150px]"}),p("div",C,[u(t,{class:"h-[28px] w-[120px]"}),u(t,{class:"h-[28px] w-[38px]"})])])]))),64))])}]]),F={class:"bg-[#F6F7FC] py-6 lg:py-10 px-2 lg:px-14 h-fit"},T={class:"font-bold text-3xl lg:mb-12 mb-6"},L={key:0},M={key:1},S={key:1,class:"space-y-4 lg:space-y-8 lg:mt-10"},I={class:"flex-shrink-0"},P=["src"],W={class:"w-full"},B={class:"flex items-center gap-2 justify-between mb-4"},K={class:"font-medium text-lg line-clamp-1"},O={class:"flex items-center gap-2 justify-between"},V={class:"!text-sm lg:!text-lg font-medium text-[##03030]"},Y={class:"flex lg:hidden items-center gap-2"},Z={class:"font-medium text-lg"},q={class:"hidden lg:flex items-center gap-2"},A={key:0,src:j,alt:"star",class:"w-6 h-6"},D={key:1,src:_,alt:"star",class:"w-6 h-6"},G={key:1,class:"flex gap-4 mt-4 items-center flex-wrap"},H=["src"],J=["onClick"],N={key:2},Q=["src"],R={__name:"my-reviews",setup(s){a();const e=t().$axios,_=l(),{data:E,status:z}=i("my-reviews",(()=>e("review").then((s=>s.data)).catch((s=>s))));const C=m((()=>r("yumaii_country_id").value)),R=g(!1),U=g(null);return(s,e)=>{var a;const t=$,l=k,i=b;return o(),n("div",F,[p("h3",T,v(s.$t("TITLES.my_reviews")),1),"pending"===x(z)?(o(),n("div",L,[u(t)])):"success"===x(z)?(o(),n("div",M,[f("",!0),x(E).data&&x(E).data.length?(o(),n("div",S,[(o(!0),n(c,null,d(null==(a=x(E))?void 0:a.data,((a,t)=>{var l,i,r,u,m;return o(),n("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"},[p("div",I,[p("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,P)]),p("div",W,[p("div",B,[p("p",K,v(a.title),1)]),f("",!0),p("div",O,[p("div",V,v(s.$t("TITLES.price"))+": "+v(s.$n(+a.price))+" "+v((null==(r=null==(i=x(_).countries)?void 0:i.find((s=>s.id==x(C))))?void 0:r.currency)||(null==(u=x(_).countries[0])?void 0:u.currency)),1),p("div",Y,[e[8]||(e[8]=p("img",{src:j,alt:"star",class:"w-5 h-5"},null,-1)),p("span",Z,v((null==a?void 0:a.rate)??"0"),1)]),p("div",q,[(o(),n(c,null,d(5,(s=>p("span",{key:s,class:"cursor-pointer flex-shrink-0 transition duration-300 hover:scale-110"},[s<=a.rate?(o(),n("img",A)):(o(),n("img",D))]))),64))])]),(null==(m=a.images)?void 0:m.length)?(o(),n("div",G,[(o(!0),n(c,null,d(a.images,(s=>(o(),n("div",{class:"relative group",key:s},[p("img",{src:s,alt:"star",width:"120",height:"120",class:"w-[120px] h-[120px] object-cover"},null,8,H),p("button",{onClick:e=>function(s){R.value=!0,U.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]=[p("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[p("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),p("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,J)])))),128))])):f("",!0)])])})),128))])):(o(),n("div",N,[u(l,{class:"!min-h-[320px]"})]))])):f("",!0),(o(),h(y,{custom:"",to:"body"},[x(R)?(o(),h(i,{key:0,onClose:e[0]||(e[0]=s=>R.value=!1)},{default:w((()=>[p("img",{src:x(U),"data-aos":"zoom-in","data-aos-duration":"800",alt:"review image",class:"max-h-[90%] max-w-[90%] object-cover"},null,8,Q)])),_:1})):f("",!0)]))])}}};export{R as default};
