'use strict';

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

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

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

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

function BottomSheetHeader(_a) {
    var { headerTitle, icon = React__default['default'].createElement(Placeholder['default'], null), hasPullTab = false, pinnedHeader = false, headerContentModifiers = 'empty', headerControlsModifiers = 'close', onClose } = _a, props = _tslib.__rest(_a, ["headerTitle", "icon", "hasPullTab", "pinnedHeader", "headerContentModifiers", "headerControlsModifiers", "onClose"]);
    const appendTestId = index.getId(`${props['data-testid']}-bottom-sheet-header`);
    const appendTrackId = index.getId(`${props['data-trackid']}-bottom-sheet-header`);
    const appendId = index.getId(`${props['id']}`);
    return (React__default['default'].createElement(styles.HeaderWrapper, { hasPullTab: hasPullTab, pinnedHeader: pinnedHeader, "data-testid": appendTestId('wrapper'), id: appendId('wrapper') }, headerContentModifiers === 'empty' &&
        headerControlsModifiers === 'default' ? null : (React__default['default'].createElement(styles.HeaderInnerWrapper, { headerContentModifiers: headerContentModifiers },
        React__default['default'].createElement(styles.IconTitleWrapper, { headerControlsModifiers: headerControlsModifiers },
            headerContentModifiers === 'withIcon' && icon,
            headerContentModifiers !== 'empty' && (React__default['default'].createElement("h3", { "data-testid": appendTestId('title') }, headerTitle))),
        headerControlsModifiers === 'close' && (React__default['default'].createElement(index$1.IconButton, { size: "x-small", variant: "ghost-tertiary", icon: React__default['default'].createElement(Close['default'], null), onClick: onClose, "data-testid": appendTestId('close-button'), "data-trackid": appendTrackId('close-button') }))))));
}

exports.BottomSheetHeader = BottomSheetHeader;
