"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ContextPaneHeader = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const ContextHeader_1 = require("./ContextHeader");
const Space_1 = require("nice-ui/lib/3-list-item/Space");
const BasicButtonBack_1 = require("nice-ui/lib/2-inline-block/BasicButton/BasicButtonBack");
const BasicButtonClose_1 = require("nice-ui/lib/2-inline-block/BasicButton/BasicButtonClose");
const Flex_1 = require("nice-ui/lib/3-list-item/Flex");
const Split_1 = require("nice-ui/lib/3-list-item/Split");
const ContextPaneHeader = ({ short, right, children, onBackClick, onCloseClick, }) => {
    let element = (React.createElement(Flex_1.Flex, { style: { alignItems: 'center' } },
        !!onBackClick && (React.createElement(React.Fragment, null,
            React.createElement(BasicButtonBack_1.BasicButtonBack, { onClick: onBackClick }),
            React.createElement(Space_1.Space, { horizontal: true }))),
        children));
    if (onCloseClick || right) {
        element = (React.createElement(Split_1.Split, { style: { alignItems: 'center' } },
            element,
            React.createElement(Flex_1.Flex, { style: { flexDirection: 'row-reverse' } },
                !!onCloseClick && React.createElement(BasicButtonClose_1.BasicButtonClose, { onClick: onCloseClick }),
                right)));
    }
    return (React.createElement(ContextHeader_1.ContextHeader, { style: { padding: short ? '12px 16px' : '16px', borderRadius: '8px 8px 0 0' } }, element));
};
exports.ContextPaneHeader = ContextPaneHeader;
//# sourceMappingURL=ContextPaneHeader.js.map