const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vendor-vue3-toastify-DHXAGmwn.css","./RangeTime-CUjlXf8c.css","./SingleTime-AJjE8T6Y.css"])))=>i.map(i=>d[i]);
import{_ as g}from"./convert-case-to-camel-case.utils-CK5dBN7n.js";import{u as x}from"./vendor-vue-runtime-dom-B2rky8vu.js";import{u as M}from"./appearanceStore-Cp-euDX2.js";import{_ as N}from"./ProBadge.vue_vue_type_style_index_0_lang-DqDXUf8-.js";import{u as E}from"./useAppearanceTypography-BBl5RU11.js";import{d as I,e as i,$ as y,a as B,f as l,i as s,x as c,t as n,z as R,j as w,k as q,v as z}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{u as t,t as F,r as L}from"./vendor-vue-reactivity-CheHbvBM.js";import{t as p,a as O}from"./vendor-vue-shared-DrzsEcag.js";import"./vendor-pinia-BSPefQhS.js";import"./appStore-CFAkQG2b.js";import"./useAppearanceStore-IzenP-G4.js";import"./vendor-axios-xsH4HHeE.js";import"./vendor-vue3-toastify-DBGjcIyK.js";const j={class:"ccb-field__label"},U={class:"ccb-field__title"},G={key:0,class:"ccb-field-required-mark"},J={key:0,class:"ccb-field__hidden"},K={key:0,class:"ccb-field__descriptions ccb-before"},Q={key:0,class:"ccb-field__description"},W={class:"ccb-field__input-wrapper"},X={key:1,class:"ccb-field__descriptions ccb-after"},Y={key:0,class:"ccb-field__description"},pe=I({__name:"TimePicker",props:{field:{}},setup(k){x(a=>({"4f4c69c6":t(T),61709049:t($),"5b33c3b2":t(C),"8535d754":t(V)}));const{borderColor:C,formFieldsColor:V,textColor:T,accentColor:$}=E(),A=k,{field:e}=F(A),f=M(),D=i(()=>typeof e.value.range=="string"?e.value.range==="1":e.value.range),P=i(()=>e.value.useInterval?e.value.minInterval||"1h":""),_=i(()=>{const a=e.value.placeholderHours.length>0?e.value.placeholderHours:new Date().getHours(),o=e.value.placeholderTime.length>0?e.value.placeholderTime:new Date().getMinutes();return{hours:a,minutes:o,seconds:0}}),u=i(()=>e.value.format||!1),S=i(()=>D.value?y(()=>g(()=>import("./RangeTime-nVvKejEx.js"),__vite__mapDeps([0,1]),import.meta.url)):y(()=>g(()=>import("./SingleTime-D5Jg1X1s.js"),__vite__mapDeps([0,2]),import.meta.url))),r=L(null);B(()=>{r.value={hours:Number(_.value.hours),minutes:Number(_.value.minutes),seconds:0},e.value.displayValue=H.value});const H=i(()=>{if(!r.value)return"";if(Array.isArray(r.value)){const a=r.value[0],o=r.value[1];return`${d(a)} - ${d(o)}`}else return d(r.value)}),d=a=>{const{hours:o,minutes:m}=a,b=m.toString().padStart(2,"0");if(u.value)return`${o.toString().padStart(2,"0")}:${b}`;{const h=o>=12?"PM":"AM";return`${o%12||12}:${b} ${h}`}},v=i(()=>e.value.additionalStyles||"");return(a,o)=>(s(),l("div",{class:O(["ccb-field ccb-timePicker-field",{"ccb-24-hours":u.value,"ccb-field-disabled":t(e).disabled,[v.value]:v.value}])},[c("div",j,[c("div",U,[R(p(t(e).label),1),t(e).required?(s(),l("span",G,"*")):n("",!0),w(N)]),t(e).hidden?(s(),l("div",J,o[1]||(o[1]=[c("i",{class:"ccb-icon-ic_eye_crossed"},null,-1)]))):n("",!0)]),t(f).descriptionPosition==="before"?(s(),l("div",K,[t(e).description?(s(),l("div",Q,p(t(e).description),1)):n("",!0)])):n("",!0),c("div",W,[(s(),q(z(S.value),{modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=m=>r.value=m),alias:t(e).alias,format:u.value,default:"23:05",field:t(e),"min-interval":P.value},null,8,["modelValue","alias","format","field","min-interval"]))]),t(f).descriptionPosition==="after"?(s(),l("div",X,[t(e).description?(s(),l("div",Y,p(t(e).description),1)):n("",!0)])):n("",!0)],2))}});export{pe as default};
//# sourceMappingURL=TimePicker-D_afq7QO.js.map
