1import{D as M,a7 as H,r as U,j as u,d as W,a as o,c as l,b as v,F as D,m as g,u as n,i as r,g as k,t as a,p as h,q as w,e as p,w as m,x as J,_ as q,v as G,y as K,Q as E}from"./d74OVHi6.js";import{_ as Q}from"./B0x8PcLs.js";import{_ as Y}from"./DlAUqK2U.js";const X=()=>{const t="favorites",e=U([]);M(()=>{if(typeof window<"u")try{const i=localStorage.getItem(t);i&&(e.value=JSON.parse(i))}catch(i){console.error("Failed to load favorites:",i),e.value=[]}});const S=()=>{typeof window<"u"&&localStorage.setItem(t,JSON.stringify(e.value))},F=i=>e.value.includes(i),T=(i,x)=>{x&&(x.preventDefault(),x.stopPropagation());const N=e.value.indexOf(i);N===-1?e.value.push(i):e.value.splice(N,1),S()},$=i=>{F(i)||(e.value.push(i),S())},d=i=>{const x=e.value.indexOf(i);x!==-1&&(e.value.splice(x,1),S())},z=u(()=>e.value.length);return{favorites:H(e),favoritesCount:z,isFavorite:F,toggleFavorite:T,addFavorite:$,removeFavorite:d}},Z=["title"],_={class:"relative aspect-video bg-gray-200 overflow-hidden"},tt=["title"],et={key:2,class:"w-full h-full flex items-center justify-center text-gray-400"},nt=["title"],ot={key:4,class:"absolute top-2 right-2 bg-white px-2 py-1 rounded text-sm font-medium text-gray-700"},st={class:"p-4"},at={class:"font-bold text-lg text-gray-900 dark:text-white mb-2 flex items-center gap-2 flex-wrap"},rt=["title"],lt={class:"text-sm text-gray-600 dark:text-gray-400 mb-2 line-clamp-2"},it=["href"],ct={class:"truncate"},dt=["href"],ut={class:"truncate"},mt={key:3,class:"mb-2"},xt={class:"flex items-center flex-wrap gap-x-3 gap-y-1 text-sm text-gray-500"},gt={key:0,class:"flex items-center"},ht={key:4,class:"mt-2 text-xs text-gray-500 flex items-start"},ft=["innerHTML"],vt={key:1,class:"line-clamp-1"},yt=W({__name:"ContentCard",props:{content:{},showFavorite:{type:Boolean},hideCategory:{type:Boolean},ringColorClass:{},textColorClass:{}},setup(t){const e=t,S=u(()=>e.ringColorClass||"hover:ring-blue-500"),F=u(()=>e.textColorClass||"text-blue-600"),T=u(()=>e.content.status!==void 0&&e.content.status!==1),$=u(()=>e.content.status===4),d=u(()=>{switch(e.content.status){case 4:return{label:"ÃNCHIS",tooltip:"LocaÈie închisÄ permanent",classes:"bg-red-600 text-white"};case 0:return{label:"ASCUNS",tooltip:"Status: Ascuns",classes:"bg-gray-600 text-white"};case 2:return{label:"VALIDARE",tooltip:"Status: Ãn validare",classes:"bg-yellow-500 text-white"};case 3:return{label:"ÈTERS",tooltip:"Status: Èters",classes:"bg-red-800 text-white"};default:return null}}),{isFavorite:z,toggleFavorite:i}=X(),x=u(()=>e.content.image_large||e.content.image_medium||e.content.image),N=u(()=>e.content.acc_type>1),C=c=>(e.content.ctabs&1<<c)!==0,L=c=>c?c.startsWith("http://")||c.startsWith("https://")?c:"https://"+c:"",O=u(()=>{const c=e.content.acc_type;return c>=4&&c<=6||c>=14&&c<=16}),B=u(()=>{switch(e.content.package){case"Diamond":return"bg-gradient-to-r from-purple-600 to-pink-500 text-white";case"Platinum":return"bg-gradient-to-r from-gray-700 to-gray-500 text-white";case"Gold":return"bg-gradient-to-r from-yellow-500 to-amber-400 text-white";case"Bronze":return"bg-gradient-to-r from-amber-700 to-amber-600 text-white";case"Partner":return"bg-blue-500 text-white";default:return"bg-gray-500 text-white"}}),y=u(()=>Number(e.content.ext_direct)===1&&!!e.content.ext_url),I=u(()=>{if(!y.value||!e.content.ext_url)return"";try{const c=new URL(e.content.ext_url).host.replace(/^www\./,"");return K[c]?.cityDisplay||""}catch{return""}}),V=u(()=>y.value?e.content.ext_url:`/despre/${e.content.slug}/`),j=()=>{y.value&&e.content.ext_url?E(e.content.ext_url,{external:!0}):E(`/despre/${e.content.slug}/`)};return(c,s)=>{const A=J,f=q,b=G,P=Q;return o(),l("div",{class:k(["block bg-gray-100 dark:bg-gray-800 rounded-lg overflow-hidden cursor-pointer",n(O)?"ring-2 ring-yellow-400 border-yellow-400":`hover:ring-1 ${n(S)}`,n(T)?"opacity-60 grayscale":""]),title:n(d)?n(d).tooltip:void 0,onClick:j},[v("div",_,[t.content.image?(o(),l(D,{key:0},[g(A,{src:n(x),width:60,widths:[60],alt:"","img-class":"absolute inset-0 w-full h-full object-cover scale-110 blur-2xl"},null,8,["src"]),g(A,{src:n(x),width:400,widths:[200,400,600,800],sizes:"(max-width: 640px) 100v
1w, (max-width: 1024px) 50vw, 33vw",alt:t.content.name,"img-class":"relative w-full h-full object-contain"},null,8,["src","alt"])],64)):r("",!0),n(d)?(o(),l("div",{key:1,class:k(["absolute top-2 right-2 px-2 py-1 rounded text-xs font-bold shadow-md z-10",n(d).classes]),title:n(d).tooltip},a(n(d).label),11,tt)):(o(),l("div",et,[g(f,{name:"mdi:image-outline",class:"w-16 h-16"})])),t.showFavorite&&!n(y)?(o(),l("button",{key:3,onClick:s[0]||(s[0]=R=>n(i)(t.content.id,R)),class:"absolute top-2 left-2 p-1.5 bg-white/80 dark:bg-gray-800/80 hover:bg-white dark:hover:bg-gray-800 rounded-full transition-colors z-10",title:n(z)(t.content.id)?"Sterge din favorite":"Adauga la favorite"},[n(z)(t.content.id)?(o(),h(f,{key:0,name:"mdi:heart",class:"w-5 h-5 text-red-500"})):(o(),h(f,{key:1,name:"mdi:heart-outline",class:"w-5 h-5 text-gray-600 dark:text-gray-400 hover:text-red-500"}))],8,nt)):r("",!0),t.content.price_range&&!n(d)?(o(),l("div",ot,a(t.content.price_range),1)):r("",!0),t.content.package?(o(),l("div",{key:5,class:k(["absolute bottom-2 left-2 px-2 py-0.5 rounded text-xs font-semibold",n(B)])},a(t.content.package_ref||t.content.package),3)):r("",!0)]),v("div",st,[v("h3",at,[g(b,{to:n(V),external:n(y),class:"hover:text-red-600 line-clamp-1",onClick:s[1]||(s[1]=m(()=>{},["stop"]))},{default:w(()=>[p(a(t.content.name),1)]),_:1},8,["to","external"]),n(d)?(o(),l("span",{key:0,class:k(["px-1.5 py-0.5 rounded text-[10px] leading-4 font-bold whitespace-nowrap shrink-0",n(d).classes]),title:n(d).tooltip},a(n(d).label),11,rt)):r("",!0),t.content.package?(o(),l("span",{key:1,class:k(["px-1.5 py-0.5 rounded text-[10px] leading-4 font-semibold whitespace-nowrap shrink-0",n(B)])},a(t.content.package_ref||t.content.package),3)):r("",!0),n(y)?(o(),h(f,{key:2,name:"mdi:open-in-new",class:"w-3.5 h-3.5 shrink-0 text-blue-500 dark:text-blue-400",title:n(I)?`Se deschide pe ${n(I)}`:"Se deschide în alt oraÈ"},null,8,["title"])):r("",!0)]),t.hideCategory?r("",!0):(o(),l("div",{key:0,class:k(["text-sm mb-2",n(F)])},a(t.content.category?.name),3)),v("p",lt,a(t.content.small_text),1),t.content.phone&&!n($)?(o(),l("a",{key:1,href:`tel:${t.content.phone}`,onClick:s[2]||(s[2]=m(()=>{},["stop"])),class:"text-sm text-gray-700 dark:text-gray-300 hover:text-blue-600 flex items-center mb-2"},[g(f,{name:"mdi:phone",class:"w-4 h-4 mr-1.5 flex-shrink-0 text-green-600"}),v("span",ct,a(t.content.phone),1)],8,it)):r("",!0),n(N)&&t.content.web&&!n($)?(o(),l("a",{key:2,href:L(t.content.web),target:"_blank",rel:"noopener noreferrer",onClick:s[3]||(s[3]=m(()=>{},["stop"])),class:"text-xs text-blue-600 hover:text-blue-800 hover:underline flex items-center mb-2"},[g(f,{name:"mdi:open-in-new",class:"w-3 h-3 mr-1 flex-shrink-0"}),v("span",ut,a(t.content.web),1)],8,dt)):r("",!0),t.content.show_time||t.content.next_representations?.length?(o(),l("div",mt,[g(P,{representations:t.content.next_representations,"count-upcoming":t.content.counters?.representations,"fallback-show-time":t.content.show_time},null,8,["representations","count-upcoming","fallback-show-time"])])):r("",!0),v("div",xt,[t.content.rating?(o(),l("div",gt,[g(f,{name:"mdi:thumb-up",class:k(["w-3.5 h-3.5 mr-1",t.content.rating>0?"text-green-500":"text-red-500"])},null,8,["class"]),v("span",null,a(t.content.rating),1)])):r("",!0),n(y)?r("",!0):(o(),l(D,{key:1},[t.content.counters?.representations>0&&C(3)?(o(),h(b,{key:0,to:`/reprezentari/${t.content.slug}/`,class:"text-xs text-blue-600 hover:text-red-600",onClick:s[4]||(s[4]=m(()=>{},["stop"]))},{default:w(()=>[p(a(t.content.counters.representations)+" "+a(t.content.counters.representations===1?"reprezentare":"reprezentari"),1)]),_:1},8,["to"])):r("",!0),t.content.counters?.photos>0&&C(5)?(o(),h(b,{key:1,to:`/poze/${t.content.slug}/`,class:"text-xs text-blue-600 hover:text-red-600",onClick:s[5]||(s[5]=m(()=>{},["stop"]))},{default:w(()=>[p(a(t.content.counters.photos)+" "+a(t.content.counters.photos===1?"poza":"poze"),1)]),_:1},8,["to"])):r("",!0),t.content.counters?.videos>0&&C(6)?(o(),h(b,{key:2,to:`/filme/${t.content.slug}/`,class:"text-xs text-blue-600 hover:text-red-600",onClick:s[6]||(s[6]=m(()=>{},["stop"]))},{default:w(()=>[p(a(t.content.counters.videos)+" "+a(t.content.counters.videos===1?"film":"filme"),1)]),_:1},8,["to"])):r("",!0),t.content.counters?.comments>0&&C(4)?(o(),h(b,{key:3,to:`/comentarii/${t.content.slug}/`,class:"text-xs text-blue-600 hover:text-red-600",onClick:s[7]||(s[7]=m(()=>{},["stop"]))},{default:w(()=>[p(a(t.content.counters.comments)+" "+a(t.content.counters.comments===1?"comentariu":"comentarii"),1)]),_:1},8,["to"])):r("",!0),t.content.counters?.events>0&&C(9)?(o(),h(b,{key:4,to:`/evenimente/${t.content.slug}/`,class:"text-xs text-blue-600 hover:text-red-600",onClick:s[8]||(s[8]=m(()=>{},["stop"]))},{default:w(()=>[p(a(t.content.counters.events)+" "+a(t.content.counters.events===1?"eveniment":"evenimente"),1)]),_:1},8,["to"])):r("",!0),t.content.has_map&&C(1)?(o(),h(b,{key:5,to:`/peharta/${t.content.slug}/`,class:"text-xs text-blue-600 hover:text-red-600",onClick:s[9]||(s[9]=m(()=>{},["stop"]))},{default:w(()=>[...s[11]||(s[11]=[p(" harta ",-1)])]),_:1},8,["to"])):r("",!0)],64))]),t.content.address?(o(),l("div",ht,[g(f,{name:"mdi:map-marker",class:"w-4 h-4 mr-1 flex-shrink-0 mt-0.5"}),t.content.address_render?(o(),l("span",{key:0,class:"line-clamp-1 address-links",innerHTML:t.content.address_render,onClick:s[10]||(s[10]=m(()=>{},["stop"]))},null,8,ft)):(o(),l("span",vt,a(t.content.address),1))])):r("",!0)])],10,Z)}}}),pt=Object.assign(Y(yt,[["__scopeId","data-v-a21dd18d"]]),{__name:"ContentCard"});export{pt as _,X as u};
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.