import { __assign } from "tslib";
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
import noop from '../../utils/noop';
import Icon from '../../icon';
var prefixCls = 'zent-datepicker-panel-header';
var DoubleIconArrow = function (_a) {
    var onClick = _a.onClick, type = _a.type;
    return (_jsx(Icon, { type: type === 'left' ? 'double-last' : 'double-next', onClick: onClick, className: prefixCls + "-arrow" }, void 0));
};
var IconArrow = function (_a) {
    var onClick = _a.onClick, type = _a.type;
    return (_jsx(Icon, { type: type, onClick: onClick, className: prefixCls + "-arrow" }, void 0));
};
export var Title = function (_a) {
    var text = _a.text, _b = _a.unit, unit = _b === void 0 ? '' : _b, onClick = _a.onClick;
    return (_jsxs("div", __assign({ className: prefixCls + "-title_clickable", onClick: onClick, "data-zv": 'v10.0.11' }, { children: [text, unit] }), void 0));
};
var PanelHeader = function (_a) {
    var _b = _a.showSuper, showSuper = _b === void 0 ? false : _b, titleNode = _a.titleNode, combinedLeft = _a.combinedLeft, combinedRight = _a.combinedRight, onPrev = _a.onPrev, onNext = _a.onNext, _c = _a.onSuperPrev, onSuperPrev = _c === void 0 ? noop : _c, _d = _a.onSuperNext, onSuperNext = _d === void 0 ? noop : _d;
    return (_jsxs("div", __assign({ className: prefixCls, "data-zv": 'v10.0.11' }, { children: [_jsx("div", __assign({ className: prefixCls + "-btns", "data-zv": 'v10.0.11' }, { children: !combinedRight && (_jsxs(_Fragment, { children: [showSuper && _jsx(DoubleIconArrow, { onClick: onSuperPrev, type: "left" }, void 0), _jsx(IconArrow, { onClick: onPrev, type: "left" }, void 0)] }, void 0)) }), void 0), _jsx("div", __assign({ className: prefixCls + "-title", "data-zv": 'v10.0.11' }, { children: titleNode }), void 0), _jsx("div", __assign({ className: prefixCls + "-btns", "data-zv": 'v10.0.11' }, { children: !combinedLeft && (_jsxs(_Fragment, { children: [_jsx(IconArrow, { onClick: onNext, type: "right" }, void 0), showSuper && (_jsx(DoubleIconArrow, { onClick: onSuperNext, type: "right" }, void 0))] }, void 0)) }), void 0)] }), void 0));
};
export default PanelHeader;
