const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vendor-vue3-html2pdf-DBfPfU4j.css","./TimeDropdown-CU9JQw3o.css","./RangeTime-DOYWWNW5.css"])))=>i.map(i=>d[i]);
import{_ as S}from"./convert-case-to-camel-case.utils-CK5dBN7n.js";import{u as H}from"./appearanceStore-Cp-euDX2.js";import{u as M,a as N}from"./fieldsStore-CQRN0FvQ.js";import{_ as R}from"./ProBadge.vue_vue_type_style_index_0_lang-DqDXUf8-.js";import{_ as D}from"./RequiredHint.vue_vue_type_style_index_0_lang-DGTCbwUk.js";import{u as E}from"./settingsStore-8bwiLMEn.js";import{d as I,e as s,$ as k,a as B,f as l,i,x as p,t as n,k as V,z,j as L,v as O}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{t as W,r as j,u as r}from"./vendor-vue-reactivity-CheHbvBM.js";import{t as f,a as w}from"./vendor-vue-shared-DrzsEcag.js";import"./vendor-pinia-BSPefQhS.js";import"./appStore-CFAkQG2b.js";import"./translationsStore-D6vLzgNA.js";import"./vendor-moment-Cv92BTSA.js";import"./vendor-bootstrap-CCU-90um.js";import"./vendor-jspdf-UFhKzYHA.js";import"./vendor-php-date-formatter-DSpPwBF8.js";import"./callbackStore-BhxBUA6V.js";const U={class:"ccb-field__label"},G={class:"ccb-field__title"},J={key:0,class:"ccb-field-required-mark"},K={key:0,class:"ccb-field__descriptions ccb-before"},Q={key:0,class:"ccb-field__description"},X={class:"ccb-field__input-wrapper"},Y={key:1,class:"ccb-field__descriptions ccb-after"},Z={key:0,class:"ccb-field__description"},ge=I({__name:"TimePicker",props:{field:{}},setup(T){const $=T,{field:e}=W($),v=H(),u=M(),C=N(),x=s(()=>{var t;return((t=E().getWarningTexts)==null?void 0:t.requiredMsg)||""}),P=s(()=>typeof e.value.range=="string"?e.value.range==="1":e.value.range),q=s(()=>e.value.useInterval?e.value.minInterval||"1h":""),c=s(()=>e.value.format||!1),A=s(()=>P.value?k(()=>S(()=>import("./RangeTime-C0UTHUn5.js"),__vite__mapDeps([0,1,2]),import.meta.url)):k(()=>S(()=>import("./SingleTime-D2J-26d_.js"),__vite__mapDeps([0,1]),import.meta.url))),_=s(()=>u.checkFieldRequired(e.value)),a=j(null);B(()=>{e.value.placeholderHours.length>0&&(a.value={hours:Number(e.value.placeholderHours),minutes:Number(e.value.placeholderTime),seconds:0}),e.value.displayValue=b.value,u.updateField(e.value.alias,e.value,!0)});const b=s(()=>{if(!a.value)return"";if(Array.isArray(a.value)){const o=a.value[0],t=a.value[1];return`${d(o)} - ${d(t)}`}else return d(a.value)}),d=o=>{const{hours:t,minutes:m}=o,y=m.toString().padStart(2,"0");if(c.value)return`${t.toString().padStart(2,"0")}:${y}`;{const h=t>=12?"PM":"AM";return`${t%12||12}:${y} ${h}`}},F=()=>{e.value.displayValue=b.value,u.updateField(e.value.alias,e.value),C.applyConditionForField(e.value.alias)},g=s(()=>{var o;return((o=e.value)==null?void 0:o.additionalStyles)||""});return(o,t)=>(i(),l("div",{class:w(["ccb-field ccb-timePicker-field",{required:_.value,"ccb-24-hours":c.value,"ccb-field-disabled":r(e).disabled,[g.value]:g.value}])},[p("div",U,[_.value?(i(),V(D,{key:0,text:x.value},null,8,["text"])):n("",!0),p("div",G,[z(f(r(e).label),1),r(e).required?(i(),l("span",J,"*")):n("",!0),L(R)])]),r(v).descriptionPosition==="before"?(i(),l("div",K,[r(e).description?(i(),l("div",Q,f(r(e).description),1)):n("",!0)])):n("",!0),p("div",X,[(i(),V(O(A.value),{modelValue:a.value,"onUpdate:modelValue":[t[0]||(t[0]=m=>a.value=m),F],alias:r(e).alias,format:c.value,default:"23:05",field:r(e),"min-interval":q.value},null,8,["modelValue","alias","format","field","min-interval"]))]),r(v).descriptionPosition==="after"?(i(),l("div",Y,[r(e).description?(i(),l("div",Z,f(r(e).description),1)):n("",!0)])):n("",!0)],2))}});export{ge as default};
//# sourceMappingURL=index-Br4qb9sP.js.map
