"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),q=require("../../../_util/classNames.js"),x=require("../../hooks/useMergeProps.js"),H=require("../../utils/uiUtil.js"),N=require("./TimeBody.js"),P=require("./TimeHeader.js"),T=n=>n.filter(o=>o!==!1).length;function u(n){const o=x.default(n),{generateConfig:c,format:f="HH:mm:ss",prefixCls:l,active:d,operationRef:v,showHour:m,showMinute:p,showSecond:g,use12Hours:w=!1,onSelect:C,value:y}=o,s=`${l}-time-panel`,a=t.ref(),e=t.ref(-1),i=T([m,p,g,w]);return v.value={onKeydown:h=>H.createKeydownHandler(h,{onLeftRight:r=>{e.value=(e.value+r+i)%i},onUpDown:r=>{e.value===-1?e.value=0:a.value&&a.value.onUpDown(r)},onEnter:()=>{C(y||c.getNow(),"key"),e.value=-1}}),onBlur:()=>{e.value=-1}},t.createVNode("div",{class:q.default(s,{[`${s}-active`]:d})},[t.createVNode(P.default,{...o,format:f,prefixCls:l},null),t.createVNode(N.default,{...o,prefixCls:l,activeColumnIndex:e.value,operationRef:a},null)])}u.displayName="TimePanel";u.inheritAttrs=!1;exports.default=u;
