1import{u as F}from"./CjE6-_JO.js";import{f as $}from"./1U7st898.js";import{u as D,E,d as I}from"./HcjQPm2H.js";import{u as K}from"./DTOWLWxX.js";import{l as R,b as p,m as w,E as V,L as o,M as i,O as e,I as h,a0 as _,u as t,Q as A,Z as r,$ as b}from"./D0-hQYVk.js";const z={class:"urv-wrap"},N={class:"urv-tabs",role:"tablist"},P=["aria-selected","onClick"],T={key:0,class:"urv-list"},U={key:1,class:"urv-empty"},O={key:2,class:"urv-list"},Q={class:"urv-head"},Z={key:0,class:"urv-place"},j=["src","alt"],q={key:1,class:"urv-place-fallback"},G={class:"urv-place-name"},H=["aria-label"],J=["fill"],W={class:"urv-comment"},X={class:"urv-foot"},Y={class:"urv-date"},ee={key:3,class:"urv-pagination"},se=["disabled"],te={class:"urv-page-info"},ae=["disabled"],le=R({__name:"reviews",setup(oe){const{t:C}=D(),{errorAlert:x}=K(),y=F(),f=[{id:"all",labelKey:"reviews.status.all",apiStatus:null},{id:"approved",labelKey:"reviews.status.approved",apiStatus:1},{id:"pending",labelKey:"reviews.status.pending",apiStatus:0}],u=p("all"),c=p(!0),d=p(1),B=p(new Date().getTime()),m=w(()=>y.review),g=w(()=>{var a;return((a=m.value)==null?void 0:a.data)||[]}),n=w(()=>{var a;return((a=m.value)==null?void 0:a.meta)||{}});async function v(){c.value=!0;const a=f.find(l=>l.id===u.value);try{await y.getReviews({page:d.value,status:(a==null?void 0:a.apiStatus)??null,hash:B.value})}catch{x(C("reviews.error"))}finally{c.value=!1}}function S(a){a!==u.value&&(u.value=a,d.value=1,v())}function L(){n.value.current_page<n.value.last_page&&(d.value++,v())}function M(){d.value>1&&(d.value--,v())}return V(()=>v()),(a,l)=>(o(),i("div",z,[e("div",N,[(o(),i(h,null,_(f,s=>e("button",{key:s.id,type:"button",role:"tab","aria-selected":t(u)===s.id,class:A(["urv-tab",t(u)===s.id&&"urv-tab--active"]),onClick:k=>S(s.id)},r(a.$t(s.labelKey)),11,P)),64))]),t(c)?(o(),i("div",T,[(o(),i(h,null,_(3,s=>e("div",{key:s,class:"urv-card urv-card--skeleton"},l[0]||(l[0]=[e("div",{class:"sk sk-line",style:{width:"50%",height:"14px"}},null,-1),e("div",{class:"sk sk-line",style:{width:"30%"}},null,-1),e("div",{class:"sk sk-line",style:{width:"90%",height:"36px"}},null,-1)]))),64))])):t(g).length?(o(),i("div",O,[(o(!0),i(h,null,_(t(g),s=>(o(),i("article",{key:s.id,class:"urv-card"},[e("header",Q,[s.place?(o(),i("div",Z,[s.place.imgUrl?(o(),i("img",{key:0,src:s.place.imgUrl,alt:s.place.name},null,8,j)):(o(),i("div",q,l[2]||(l[2]=[e("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor","stroke-width":"1.5"},[e("path",{d:"M3 7h18M5 7v13a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V7"}),e("path",{d:"M8 7V4h8v3"})],-1)]))),e("span",G,r(t(E)(s.place.name)),1)])):b("",!0),e("span",{class:"urv-stars","aria-label":`${s.score} de 5`},[(o(),i(h,null,_(5,k=>e("svg",{key:k,viewBox:"0 0 24 24",width:"14",height:"14",fill:k<=(s.score||0)?"#FFD269":"#e5e7eb"},l[3]||(l[3]=[e("path",{d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14l-5-4.87 6.91-1.01z"},null,-1)]),8,J)),64))],8,H)]),e("p",W,r(s.comment),1),e("footer",X,[e("span",Y,r(t($)(s.date,"short")),1)])]))),128))])):(o(),i("div",U,[l[1]||(l[1]=e("div",{class:"urv-empty-ico"},[e("svg",{viewBox:"0 0 24 24",width:"32",height:"32",fill:"none",stroke:"currentColor","stroke-width":"1.5"},[e("polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"})])],-1)),e("h3",null,r(a.$t("reviews.notFoundMessages."+t(u))),1)])),!t(c)&&t(g).length&&t(n).last_page&&t(n).last_page>1?(o(),i("div",ee,[e("button",{type:"button",class:"urv-page-btn",disabled:t(n).current_page===1,onClick:M},l[4]||(l[4]=[e("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor","stroke-width":"2.5"},[e("polyline",{points:"15 18 9 12 15 6"})],-1)]),8,se),e("span",te,r(t(n).current_page)+" / "+r(t(n).last_page),1),e("button",{type:"button",class:"urv-page-btn",disabled:t(n).current_page===t(n).last_page,onClick:L},l[5]||(l[5]=[e("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor","stroke-width":"2.5"},[e("polyline",{points:"9 18 15 12 9 6"})],-1)]),8,ae)])):b("",!0)]))}}),ce=I(le,[["__scopeId","data-v-e1c8ecf7"]]);export{ce 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.