'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var vue = require('vue');
var Header = require('../Header.cjs');
var PanelContext = require('../../PanelContext.cjs');
var dateUtil = require('../../utils/dateUtil.cjs');
var useMergeProps = require('../../hooks/useMergeProps.cjs');

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

exports.default = TimeHeader;
//# sourceMappingURL=TimeHeader.cjs.map
