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 QuarterHeader(_props) {
  const props = useMergeProps(_props);
  const {
    prefixCls,
    generateConfig,
    locale,
    viewDate,
    onNextYear,
    onPrevYear,
    onYearClick
  } = props;
  const {
    hideHeader
  } = useInjectPanel();
  if (hideHeader.value)
    return null;
  const headerPrefixCls = `${prefixCls}-header`;
  return createVNode(Header, {
    ...props,
    "prefixCls": headerPrefixCls,
    "onSuperPrev": onPrevYear,
    "onSuperNext": onNextYear
  }, {
    default: () => [createVNode("button", {
      "type": "button",
      "onClick": onYearClick,
      "class": `${prefixCls}-year-btn`
    }, [formatValue(viewDate, {
      locale,
      format: locale.yearFormat,
      generateConfig
    })])]
  });
}
QuarterHeader.displayName = "QuarterHeader";
QuarterHeader.inheritAttrs = false;

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