1import{_ as h}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{o as s,b as a,a as e,F as n,e as c,t as d,d as m,n as _}from"./app-D9i5OVaw.js";const f={props:{ratings:{type:Array,required:!0,default:()=>[]}},computed:{averageRating(){return this.ratings.length===0?0:this.ratings.reduce((l,i)=>l+i.rating,0)/this.ratings.length}}},p={class:"modal-content"},v={class:"modal-body"},b={class:"row mb-5 mt-3"},x={class:"col-12 mb-lg-0"},y={class:"d-flex align-items-center gap-3 justify-content-center"},k={key:0,class:"d-flex align-items-center gap-2"},w={class:"d-flex align-items-center"},R={class:"fw-semibold fs-3"},j={key:1,class:"text-muted"},A={class:"reviews-list overflow-y-auto",style:{"max-height":"500px"}},M={class:"d-flex flex-column gap-2"},B={class:"d-flex flex-row align-items-center gap-3"},C=["src","alt"],F={class:"d-flex justify-content-between align-items-start"},L={class:"mb-0 fw-semibold text-dark"},N={class:"small flex-shrink-0"},E={class:"flex-grow-1"},S={class:"bg-light rounded p-3"},V={class:"d-flex align-items-center gap-1 mb-2"},q={class:"mb-0 text-dark"},z={key:0,class:"mt-3 ms-3 ps-3 bg-light rounded p-3 border-start border-3 border-gray"},D={class:"d-flex align-items-center gap-2 mb-2"},G={class:"mb-0 fw-semibold text-dark"},H={class:"mb-0 text-dark"},I={key:0,class:"text-center py-5 text-muted"};function J(u,l,i,K,O,o){return s(),a("div",p,[l[2]||(l[2]=e("div",{class:"modal-header"},[e("h4",{class:"modal-title",id:"myLargeModalLabel"},"Avaliações deste Anúncio"),e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})],-1)),e("div",v,[e("div",b,[e("div",x,[e("div",y,[l[0]||(l[0]=e("div",{class:"d-flex align-items-center justify-content-center flex-shrink-0"},[e("img",{width:"42",height:"42",src:"/images/property_ad_detail/ratings.svg",alt:"Avaliações"})],-1)),e("div",null,[i.ratings.length>0?(s(),a("div",k,[e("div",w,[(s(),a(n,null,c(5,t=>e("i",{key:t,class:_(["fa-star fs-3",{"fas text-primary":t<=Math.round(o.averageRating),"far text-muted":t>Math.round(o.averageRating)}])},null,2)),64))]),e("span",R,"("+d(o.averageRating.toFixed(1))+")",1)])):(s(),a("div",j," Nenhuma avaliação ainda "))])])])]),e("div",A,[(s(!0),a(n,null,c(i.ratings,(t,g)=>(s(),a("div",{key:t.id,class:_(g<i.ratings.length-1?"mb-4 pb-4 border-bottom":"")},[e("div",M,[e("div",B,[e("img",{width:"50",height:"50",src:t.rating_user.photo_url,alt:t.rating_user.full_name,class:"rounded-circle object-fit-cover"},null,8,C),e("div",F,[e("div",null,[e("h6",L,d(t.rating_user.full_name),1),e("span",N,d(t.created_at),1)])])]),e("div",E,[e("div",S,[e("div",V,[(s(),a(n,null,c(5,r=>e("i",{key:r,class:_(["fa-star",{"fas text-primary":r<=t.rating,"far text-muted":r>t.rating}])},null,2)),64))]),e("p",q,d(t.comment_property_ad||"Sem comentário"),1)]),t.reply&&t.reply.reply?(s(),a("div",z,[e("div",D,[e("h6",G," Resposta de "+d(t.rated_user.full_name)+": ",1)]),e("p",H,d(t.reply.reply),1)])):m("",!0)])])],2))),128)),i.ratings.length===0?(s(),a("div",I,[...l[1]||(l[1]=[e("i",{class:"far fa-star fa-3x mb-3 d-block"},null,-1),e("p",null,"Este espaço ainda não recebeu avaliações.",-1)])])):m("",!0)])])])}const T=h(f,[["render",J]]);export{T as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.