"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("vue"),F=require("../_util/omit.js"),s=require("../_util/type.js"),S=require("../date-picker/generatePicker/index.js"),p=require("../date-picker/generatePicker/props.js"),T=require("../form/FormItemContext.js"),q=require("../vc-util/devWarning.js"),l=()=>({format:String,showNow:s.booleanType(),showHour:s.booleanType(),showMinute:s.booleanType(),showSecond:s.booleanType(),use12Hours:s.booleanType(),hourStep:Number,minuteStep:Number,secondStep:Number,hideDisabledOptions:s.booleanType(),popupClassName:String,status:s.stringType()});function w(v){const y=S.default(v,{...l(),order:{type:Boolean,default:!0}}),{TimePicker:O,RangePicker:N}=y,x=c.defineComponent({name:"ATimePicker",inheritAttrs:!1,props:{...p.commonProps(),...p.datePickerProps(),...l(),addon:{type:Function}},slots:Object,setup(i,{slots:u,expose:C,emit:e,attrs:g}){const r=i,t=T.useInjectFormItemContext();q.default(!(u.addon||r.addon),"TimePicker","`addon` is deprecated. Please use `v-slot:renderExtraFooter` instead.");const a=c.ref();C({focus:()=>{a.value?.focus()},blur:()=>{a.value?.blur()}});const f=(o,b)=>{e("update:value",o),e("change",o,b),t.onFieldChange()},m=o=>{e("update:open",o),e("openChange",o)},h=o=>{e("focus",o)},P=o=>{e("blur",o),t.onFieldBlur()},k=o=>{e("ok",o)};return()=>{const{id:o=t.id.value}=r;return c.createVNode(O,{...g,...F.default(r,["onUpdate:value","onUpdate:open"]),id:o,dropdownClassName:r.popupClassName,mode:void 0,ref:a,renderExtraFooter:r.addon||u.addon||r.renderExtraFooter||u.renderExtraFooter,onChange:f,onOpenChange:m,onFocus:h,onBlur:P,onOk:k},u)}}}),I=c.defineComponent({name:"ATimeRangePicker",inheritAttrs:!1,props:{...p.commonProps(),...p.rangePickerProps(),...l(),order:{type:Boolean,default:!0}},slots:Object,setup(i,{slots:u,expose:C,emit:e,attrs:g}){const r=i,t=c.ref(),a=T.useInjectFormItemContext();C({focus:()=>{t.value?.focus()},blur:()=>{t.value?.blur()}});const f=(n,d)=>{e("update:value",n),e("change",n,d),a.onFieldChange()},m=n=>{e("update:open",n),e("openChange",n)},h=n=>{e("focus",n)},P=n=>{e("blur",n),a.onFieldBlur()},k=(n,d)=>{e("panelChange",n,d)},o=n=>{e("ok",n)},b=(n,d,B)=>{e("calendarChange",n,d,B)};return()=>{const{id:n=a.id.value}=r;return c.createVNode(N,{...g,...F.default(r,["onUpdate:open","onUpdate:value"]),id:n,dropdownClassName:r.popupClassName,picker:"time",mode:void 0,ref:t,onChange:f,onOpenChange:m,onFocus:h,onBlur:P,onPanelChange:k,onOk:o,onCalendarChange:b},u)}}});return{TimePicker:x,TimeRangePicker:I}}exports.default=w;exports.timePickerProps=l;
