import{Q as f}from"./vue-datepicker-DJOolBJW.js";/* empty css             */import{a as p,C as g,b as v,k as V,o as h,O as k,m as H,g as M,n as S,w as _,p as $,u as b}from"./convert-case-to-camel-case.utils-DDUpNI96.js";const x={class:"ccb-single-timePicker"},P=p({__name:"SingleTime",props:{field:{}},emits:["update:modelValue"],setup(m,{emit:l}){const c=m,{field:d}=g(c),a=l,r=t=>{const{hours:e,minutes:s}=t,u=s.toString().padStart(2,"0");if(n.value)return`${e.toString().padStart(2,"0")}:${u}`;{const i=e>=12?"PM":"AM";return`${e%12||12}:${u} ${i}`}},n=v(()=>{var t,e;return((e=(t=d.value)==null?void 0:t.attributes)==null?void 0:e.format)||!1}),o=V(new Date);return h(()=>{if(o.value instanceof Date){const t={hours:o.value.getHours(),minutes:o.value.getMinutes(),seconds:o.value.getSeconds()};a("update:modelValue",r(t))}}),k(o,t=>{if(t){let e;t instanceof Date?e={hours:t.getHours(),minutes:t.getMinutes()}:e=t,a("update:modelValue",r(e))}}),(t,e)=>(M(),H("div",x,[S(b(f),{modelValue:o.value,"onUpdate:modelValue":e[0]||(e[0]=s=>o.value=s),"time-picker":"","is-24":n.value,"minutes-grid-increment":"5",placeholder:"hh:mm"},{"input-icon":_(()=>e[1]||(e[1]=[$("i",{class:"ccb-icon-timepicker-light-clock"},null,-1)])),_:1},8,["modelValue","is-24"])]))}});export{P as default};
//# sourceMappingURL=SingleTime-VdDrzr1H.js.map
