import{d as h,q as k,o as n,c,n as b,w as x,$ as v,a as l,l as $,u as y,M as g,g as d,b as _,t as u,x as j,a0 as i}from"./index-bdziSFhr.js";import{r as w,l as z,c as f,j as L,i as B,o as N,m as S,b as V,d as P}from"./cards-BEJmyN9Y.js";import{f as m}from"./format-C4dVnwMh.js";const C={class:"flex flex-1 flex-col"},E={key:0,class:"text-[12.5px] text-fg-subtle"},M={key:0,class:"tnum text-[12.5px] text-fg-subtle"},D=h({__name:"CheckRow",props:j({label:{},hint:{},count:{},boxed:{type:Boolean}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const o=k(e,"modelValue");return(t,a)=>(n(),c("label",{class:b(["flex cursor-pointer items-center gap-2.5 text-[14px]",e.boxed?["min-h-12 rounded-[14px] border px-3.5",o.value?"border-primary bg-primary-soft":"border-border-soft bg-surface"]:""])},[x(l("input",{"onUpdate:modelValue":a[0]||(a[0]=s=>o.value=s),type:"checkbox",class:"peer sr-only"},null,512),[[v,o.value]]),l("span",{class:b(["grid h-[18px] w-[18px] flex-none place-items-center rounded-[6px] border-[1.5px] peer-focus-visible:ring-2 peer-focus-visible:ring-primary",o.value?"border-primary bg-primary text-white":"border-border-strong bg-surface"])},[o.value?(n(),$(y(g),{key:0,size:12,weight:"bold"})):d("",!0)],2),l("span",C,[_(u(e.label)+" ",1),e.hint?(n(),c("span",E,u(e.hint),1)):d("",!0)]),e.count!=null?(n(),c("span",M,u(e.count),1)):d("",!0)],2))}}),J=()=>i("GET","/watches"),A=e=>i("POST","/watches",e),G=(e,o)=>i("PUT",`/watches/${e}`,o),I=e=>i("DELETE",`/watches/${e}`),O=new Set(["razeni","strana","limit","offset","bbox","view","hlidani","nove_od"]);function R(e){const o={};for(const[t,a]of Object.entries(e))!O.has(t)&&a.trim()&&(o[t]=a.trim());return o}function F(e){const o=new URLSearchParams({...e.filters,hlidani:String(e.id)});return`${e.kind==="auction"?"/drazby":"/prodej"}?${o}`}const r=e=>`${m(Number(e))} Kč`,p=(e,o)=>e.split(",").filter(Boolean).map(o).join(" / "),T={nabidka:e=>e==="pronajem"?"Pronájem":"Prodej",kraj:e=>e,okres:e=>e,obec:e=>e,kategorie:f,dispozice:e=>p(e,P),vlastnictvi:N,stav:B,konstrukce:L,zdroj:e=>p(e,V),cena_od:e=>`od ${r(e)}`,cena_do:e=>`do ${r(e)}`,cena_m2_od:e=>`od ${m(Number(e))} Kč/m²`,cena_m2_do:e=>`do ${m(Number(e))} Kč/m²`,plocha_od:e=>`od ${e} m²`,plocha_do:e=>`do ${e} m²`,soukromi:()=>"Jen soukromí prodejci",zlevnene:()=>"Jen zlevněné",q:e=>`„${e}"`},W={kraj:e=>e,okres:e=>e,kategorie:f,typ:z,stav:e=>e==="vse"?"Všechny stavy":S(e),cena_od:e=>`podání od ${r(e)}`,cena_do:e=>`podání do ${r(e)}`,sleva_min:e=>`sleva ≥ ${Math.round(Number(e)*100)} %`,opakovane:()=>"Opakované dražby",bez_podilu:()=>"Bez podílů",bez_bremen:()=>"Bez břemen",jen_volne:()=>"Jen volné",jen_kompletni:()=>"S posudkem",riziko:w,termin_do:e=>`termín do ${e} dnů`,od:e=>`od ${e}`,do:e=>`do ${e}`,q:e=>`„${e}"`};function H(e){const o=e.kind==="auction"?W:T,t=[];for(const a of Object.keys(o)){const s=e.filters[a];s&&t.push(o[a](s))}for(const[a,s]of Object.entries(e.filters))!(a in o)&&s&&t.push(`${a}: ${s}`);return t}export{D as _,F as a,I as b,A as c,H as d,J as f,G as u,R as w};