'use strict';

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

var _tslib = require('../../../_virtual/_tslib.js');
var React = require('react');
var Close = require('../../../icons/Close.js');
var styles = require('../styles.js');
var index = require('../../IconButton/index.js');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var React__default = /*#__PURE__*/_interopDefaultLegacy(React);

function ModalHeader(_a) {
    var { className, children, onClose, hideCloseIcon, mode, variant } = _a, props = _tslib.__rest(_a, ["className", "children", "onClose", "hideCloseIcon", "mode", "variant"]);
    const testId = props['data-testid'];
    const tackingId = props['data-trackid'];
    return (React__default['default'].createElement(styles.StyledModalHeader, { className: className, "data-testid": testId || undefined, "data-trackingid": tackingId || undefined, variant: variant },
        React__default['default'].createElement(styles.ModalTitle, { mode: mode, hideCloseIcon: hideCloseIcon, variant: variant }, children),
        !hideCloseIcon && (React__default['default'].createElement(index.IconButton, { variant: "ghost", size: "medium", icon: React__default['default'].createElement(Close['default'], null), onClick: onClose, "data-testid": testId ? `${testId}-close-button` : undefined, "data-trackingid": tackingId ? `${tackingId}-close-button` : undefined }))));
}

exports.ModalHeader = ModalHeader;
