'use strict';

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

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

const HIDDEN_STYLE = {
  visibility: "hidden"
};
function Header(_props, {
  slots
}) {
  var _a;
  const props = useMergeProps.default(_props);
  const {
    prefixCls,
    prevIcon = "\u2039",
    nextIcon = "\u203A",
    superPrevIcon = "\xAB",
    superNextIcon = "\xBB",
    onSuperPrev,
    onSuperNext,
    onPrev,
    onNext
  } = props;
  const {
    hideNextBtn,
    hidePrevBtn
  } = PanelContext.useInjectPanel();
  return vue.createVNode("div", {
    "class": prefixCls
  }, [onSuperPrev && vue.createVNode("button", {
    "type": "button",
    "onClick": onSuperPrev,
    "tabindex": -1,
    "class": `${prefixCls}-super-prev-btn`,
    "style": hidePrevBtn.value ? HIDDEN_STYLE : {}
  }, [superPrevIcon]), onPrev && vue.createVNode("button", {
    "type": "button",
    "onClick": onPrev,
    "tabindex": -1,
    "class": `${prefixCls}-prev-btn`,
    "style": hidePrevBtn.value ? HIDDEN_STYLE : {}
  }, [prevIcon]), vue.createVNode("div", {
    "class": `${prefixCls}-view`
  }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), onNext && vue.createVNode("button", {
    "type": "button",
    "onClick": onNext,
    "tabindex": -1,
    "class": `${prefixCls}-next-btn`,
    "style": hideNextBtn.value ? HIDDEN_STYLE : {}
  }, [nextIcon]), onSuperNext && vue.createVNode("button", {
    "type": "button",
    "onClick": onSuperNext,
    "tabindex": -1,
    "class": `${prefixCls}-super-next-btn`,
    "style": hideNextBtn.value ? HIDDEN_STYLE : {}
  }, [superNextIcon])]);
}
Header.displayName = "Header";
Header.inheritAttrs = false;

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