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