'use strict';

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

var React = require('react');
var ChevronRight = require('../../../icons/ChevronRight.js');
var index = require('../../BottomSheet/index.js');
var index$1 = require('../../Button/index.js');
var styles = require('../styles.js');

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

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

function OpenTabs({ showBottomSheet, tabs, selectedTab, dismissText, toggleBottomSheet, onExpandItemClick, }) {
    return (React__default['default'].createElement(index.BottomSheet, { isOpened: showBottomSheet, onClose: toggleBottomSheet, headerContentModifiers: "empty", headerControlsModifiers: "close", height: "100%" },
        React__default['default'].createElement(styles.TabList, null, tabs.map((tab) => (React__default['default'].createElement(styles.ExpandedTabItem, { key: `expanded-${tab.value}`, onClick: () => onExpandItemClick(tab) },
            React__default['default'].createElement(styles.ExpandedItemText, null,
                React__default['default'].createElement(styles.ExpandedLabel, { selected: tab.value === selectedTab.value }, tab.label),
                tab.secondaryText && (React__default['default'].createElement(styles.ExpandedSecondary, null, tab.secondaryText))),
            React__default['default'].createElement(ChevronRight['default'], null))))),
        React__default['default'].createElement(styles.DismissWrapper, null,
            React__default['default'].createElement(index$1.Button, { variant: "secondary", size: "medium", fullWidth: true, onClick: toggleBottomSheet }, dismissText))));
}

exports.OpenTabs = OpenTabs;
