import{u as B}from"./vendor-vue-runtime-dom-B2rky8vu.js";import{u as x}from"./callbackStore-BhxBUA6V.js";import{a as $,u as w}from"./useAppearanceTypography-BBl5RU11.js";import{d as T,e as v,w as A,f as F,i as M,x as i}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{u as o,r as D}from"./vendor-vue-reactivity-CheHbvBM.js";import{t as H}from"./vendor-vue-shared-DrzsEcag.js";import"./vendor-pinia-BSPefQhS.js";import"./useAppearanceStore-IzenP-G4.js";import"./vendor-axios-xsH4HHeE.js";import"./vendor-vue3-toastify-DBGjcIyK.js";const N={class:"ccb-single-timePicker"},W={class:"ccb-single-timePicker__input"},O=T({__name:"SingleTime",props:{format:{type:Boolean},modelValue:{}},emits:["update:modelValue"],setup(u,{emit:m}){B(e=>({"623ccf8a":o(l),"7afefc82":o(b),"7b651cac":o(g),"7d2cf948":o(p),f6d2d08e:o(f),"0518d70b":o(d),e7063010:o(h),"677628af":o(S)}));const{textColor:l,borderColor:p,formFieldsColor:d,borderRadius:f,borderWidth:b,borderStyle:g}=w(),{fieldsBtnFontSize:h,fieldsBtnFontWeight:S}=$(),_=x(),c=u,k=m,n=D(c.modelValue||V()),C=v(()=>P(n.value));A(n,e=>{e&&k("update:modelValue",e)}),_.add("updateSingleTimePicker",e=>{if(!e)return;const[t,s]=e.toLowerCase().split(" "),[r,y]=t.split(":").map(Number);let a=r;s==="pm"&&r!==12?a=r+12:s==="am"&&r===12&&(a=0),n.value={hours:a,minutes:y,seconds:0}});function P(e){const t=e.minutes.toString().padStart(2,"0");if(c.format)return`${e.hours.toString().padStart(2,"0")}:${t}`;const s=e.hours>=12?"PM":"AM";return`${e.hours%12||12}:${t} ${s}`}function V(){const e=new Date;return{hours:e.getHours(),minutes:e.getMinutes(),seconds:0}}return(e,t)=>(M(),F("div",N,[i("div",W,[t[0]||(t[0]=i("i",{class:"ccb-icon-timepicker-light-clock"},null,-1)),i("span",null,H(C.value),1),t[1]||(t[1]=i("i",{class:"ccb-icon-Path-3485 ccb-single-timePicker__chevron"},null,-1))])]))}});export{O as default};
//# sourceMappingURL=SingleTime-D5Jg1X1s.js.map
