import{Q as D,a as _}from"./QCarousel-Cjxkio9d.js";import{d as M,aM as N,r as y,f as T,aW as B,al as i,as as m,af as r,ae as s,ad as g,ah as x,aN as b,av as v,ay as E,an as k,ao as e,ap as n,aw as S,aq as u,am as C,aD as j}from"./index-BT5eY4j5.js";import{u as I}from"./vue-i18n-CUkMLu72.js";import{Q as c}from"./QSkeleton-B930fRUI.js";import{_ as A}from"./_plugin-vue_export-helper-DlAUqK2U.js";const H={class:"text-h5 text-weight-bold"},R={class:"flex no-wrap items-center ellipsis"},$={class:"flex justify-evenly"},z={class:"text-center"},L={class:"text-caption"},O={class:"text-center"},F={class:"text-caption"},U={class:"text-center"},W={class:"text-caption"},te=M({__name:"EntityCard",props:{id:{},images:{},title:{},address:{},rating:{},workingHours:{},paymentMethods:{},nextAvailableDate:{}},setup(f){const d=f,{t:l}=I(),w=N(),h=y(0),p=y(!1),Q=t=>{const a=t.target?.classList.contains("q-carousel__thumbnail")??!1;p.value=a},V=()=>{p.value||setTimeout(()=>{w.push({name:j.Entity,params:{entityId:d.id}})},50)};return(t,a)=>T((i(),m(C,{flat:"",bordered:"",onMouseover:Q,onClick:a[1]||(a[1]=o=>V())},{default:r(()=>[s(D,{modelValue:h.value,"onUpdate:modelValue":a[0]||(a[0]=o=>h.value=o),swipeable:"",animated:"",infinite:"",thumbnails:!!t.images.length,style:{"max-height":"270px"}},{default:r(()=>[(i(!0),g(x,null,b(t.images,(o,q)=>(i(),m(_,{name:q,key:o,class:"q-pa-none","img-src":o},null,8,["name","img-src"]))),128)),t.images.length?E("",!0):(i(),m(_,{key:0,name:0,class:"flex justify-center items-center bg-grey-9"},{default:r(()=>[s(v,{name:"photo_camera",color:"grey-5",size:"lg"})]),_:1}))]),_:1},8,["modelValue","thumbnails"]),s(k,{class:"non-selectable"},{default:r(()=>[e("h1",H,n(t.title),1),e("p",R,[s(v,{name:"location_pin"}),S(" "+n(t.address),1)]),a[2]||(a[2]=e("div",{class:"q-my-md"},null,-1)),e("div",$,[e("div",z,[e("h2",L,n(u(l)("entities.workingHoursToday")),1),e("span",null,n(t.workingHours),1)]),e("div",O,[e("h2",F,n(u(l)("entities.paymentMethods")),1),e("span",null,n(t.paymentMethods.map(o=>u(l)("paymentMethods."+o)).join(", ")),1)]),e("div",U,[e("h2",W,n(u(l)("entities.nextAvailableDate")),1),e("span",null,n(t.nextAvailableDate??"Nepoznato"),1)])])]),_:1})]),_:1})),[[B,!p.value,"primary"]])}}),G={},J={class:"flex justify-evenly"};function K(f,d){return i(),m(C,{flat:"",bordered:""},{default:r(()=>[s(c,{height:"270px",square:""}),s(k,null,{default:r(()=>[s(c,{type:"text",class:"text-h5 text-weight-bold"}),s(c,{type:"text"}),d[0]||(d[0]=e("div",{class:"q-my-md"},null,-1)),e("div",J,[(i(),g(x,null,b(3,l=>s(c,{type:"QBtn",key:l})),64))])]),_:1})]),_:1})}const se=A(G,[["render",K]]);export{se as E,te as _};
