import * as React from 'react';
import { ContextHeader } from './ContextHeader';
import { Space } from 'nice-ui/lib/3-list-item/Space';
import { BasicButtonBack } from 'nice-ui/lib/2-inline-block/BasicButton/BasicButtonBack';
import { BasicButtonClose } from 'nice-ui/lib/2-inline-block/BasicButton/BasicButtonClose';
import { Flex } from 'nice-ui/lib/3-list-item/Flex';
import { Split } from 'nice-ui/lib/3-list-item/Split';
export const ContextPaneHeader = ({ short, right, children, onBackClick, onCloseClick, }) => {
    let element = (React.createElement(Flex, { style: { alignItems: 'center' } },
        !!onBackClick && (React.createElement(React.Fragment, null,
            React.createElement(BasicButtonBack, { onClick: onBackClick }),
            React.createElement(Space, { horizontal: true }))),
        children));
    if (onCloseClick || right) {
        element = (React.createElement(Split, { style: { alignItems: 'center' } },
            element,
            React.createElement(Flex, { style: { flexDirection: 'row-reverse' } },
                !!onCloseClick && React.createElement(BasicButtonClose, { onClick: onCloseClick }),
                right)));
    }
    return (React.createElement(ContextHeader, { style: { padding: short ? '12px 16px' : '16px', borderRadius: '8px 8px 0 0' } }, element));
};
//# sourceMappingURL=ContextPaneHeader.js.map