import { createVNode } from 'vue';
import Header from '../Header.mjs';
import { useInjectPanel } from '../../PanelContext.mjs';
import { formatValue } from '../../utils/dateUtil.mjs';
import useMergeProps from '../../hooks/useMergeProps.mjs';

function TimeHeader(_props) {
  const props = useMergeProps(_props);
  const {
    hideHeader
  } = useInjectPanel();
  if (hideHeader.value)
    return null;
  const {
    prefixCls,
    generateConfig,
    locale,
    value,
    format
  } = props;
  const headerPrefixCls = `${prefixCls}-header`;
  return createVNode(Header, {
    "prefixCls": headerPrefixCls
  }, {
    default: () => [value ? formatValue(value, {
      locale,
      format,
      generateConfig
    }) : "\xA0"]
  });
}
TimeHeader.displayName = "TimeHeader";
TimeHeader.inheritAttrs = false;

export { TimeHeader as default };
//# sourceMappingURL=TimeHeader.mjs.map
