import{w as h,h as _,j as f,G as b,v as y,F as k,q as w,y as j}from"./navigation-FgudCDOx.js";import{d as C,p as a,c as r,u as l,a as s,t as o,i as n,F as P,r as B,b as M,j as c}from"./index-5N4i3DXm.js";const z=["href"],L={class:"relative aspect-[16/10] w-full overflow-hidden bg-surface-2"},S=["src","alt"],A={key:1,class:"grid h-full w-full place-items-center font-mono text-[10px] uppercase tracking-[0.1em] text-fg-subtle",style:{background:"repeating-linear-gradient(135deg, rgb(var(--surface-3)) 0 9px, rgb(var(--surface-2)) 9px 18px)"}},N={class:"absolute left-2 top-2 rounded-[5px] bg-fg/85 px-2 py-1.5 font-mono text-[10px] font-medium uppercase tracking-[0.08em] text-bg"},F={key:2,class:"absolute right-2 top-2 rounded-[5px] bg-success px-2 py-1.5 font-mono text-[10px] font-semibold text-white"},V={key:3,class:"absolute bottom-2 right-2 rounded-md bg-black/60 px-1.5 py-1 font-mono text-[10px] text-white/90"},$={class:"flex flex-1 flex-col gap-2.5 p-3.5"},D={class:"line-clamp-2 text-[15px] font-semibold leading-[1.35] tracking-[-0.005em] text-fg"},T={class:"mt-0.5 truncate text-[12px] text-fg-muted"},W={class:"flex items-end justify-between gap-2"},q={class:"num text-[20px] font-semibold leading-none tracking-[-0.01em] text-fg"},E={key:0,class:"num text-right text-[12px] text-fg-subtle"},G={key:0,class:"flex flex-wrap gap-x-3 gap-y-1 border-t border-border pt-2 text-[12px] text-fg-muted"},K={class:"mt-auto flex items-center justify-between border-t border-border pt-2"},R={class:"text-[11px] text-fg-muted"},H={key:0},I={class:"font-mono text-[10px] text-fg-subtle"},J={class:"num text-[10px] text-fg-subtle"},U=C({__name:"SaleCard",props:{sale:{}},setup(x){const v=x,e=c(()=>v.sale),g=c(()=>{const t=e.value,u=t.cityPart&&t.cityPart!==t.city?t.cityPart:"",i=u.startsWith(t.city)?"":t.city,m=t.district&&t.district!==t.city&&!t.district.startsWith(t.city)?`okres ${t.district}`:"";return[t.street,u,i,m].filter(Boolean).join(" · ")}),d=c(()=>e.value.floorAreaM2??e.value.landAreaM2),p=c(()=>[e.value.disposition?w(e.value.disposition):"",d.value?`${Math.round(d.value)} m²`:"",e.value.floor!=null?`${e.value.floor}. patro`:"",e.value.ownership?j(e.value.ownership):""].filter(Boolean));return(t,u)=>(a(),r("a",{href:l(h)(e.value),class:"group relative flex cursor-pointer flex-col overflow-hidden rounded-xl border border-border bg-surface text-inherit no-underline transition-colors hover:border-border-strong"},[s("div",L,[e.value.image?(a(),r("img",{key:0,src:e.value.image,alt:e.value.title,loading:"lazy",class:"h-full w-full object-cover transition-transform duration-300 group-hover:scale-[1.02]"},null,8,S)):(a(),r("div",A," bez fotografie ")),s("span",N,o(l(_)(e.value.category)),1),e.value.discount&&e.value.discount>0?(a(),r("span",F," −"+o(Math.round(e.value.discount*100))+" % ",1)):n("",!0),e.value.imageCount>1?(a(),r("span",V,"+"+o(e.value.imageCount-1)+" fotek u zdroje",1)):n("",!0)]),s("div",$,[s("div",null,[s("h3",D,o(e.value.title||"Bez názvu"),1),s("p",T,o(g.value||"lokalita neurčena"),1)]),s("div",W,[s("div",q,o(e.value.price!=null?l(f)(e.value.price):e.value.priceNote||"cena v RK"),1),e.value.pricePerM2?(a(),r("div",E,o(l(f)(e.value.pricePerM2))+"/m²",1)):n("",!0)]),p.value.length?(a(),r("div",G,[(a(!0),r(P,null,B(p.value,i=>(a(),r("span",{key:i},o(i),1))),128))])):n("",!0),s("div",K,[s("span",R,[M(o(l(b)(e.value.sellerType)),1),e.value.sourceCount>1?(a(),r("span",H," · "+o(e.value.sourceCount)+"× nabídka",1)):n("",!0)]),s("span",I,o(l(y)(e.value.source)),1)]),s("div",J,"přidáno "+o(l(k)(e.value.publishedAt??e.value.firstSeenAt)),1)])],8,z))}});export{U as _};