import { __rest } from '../../../_virtual/_tslib.js';
import React__default from 'react';
import Close from '../../../icons/Close.js';
import { StyledModalHeader, ModalTitle } from '../styles.js';
import { IconButton } from '../../IconButton/index.js';

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

export { ModalHeader };
