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