'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('../../../Button/index.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 BottomSheetFooter(_a) {
    var { stackedActionButtons, pinnedFooter, primaryAction, dismissAction, id } = _a, props = _tslib.__rest(_a, ["stackedActionButtons", "pinnedFooter", "primaryAction", "dismissAction", "id"]);
    const appendTestId = index.getId(`${props['data-testid']}-bottom-sheet-footer`);
    const appendTrackId = index.getId(`${props['data-trackid']}-bottom-sheet-footer`);
    const appendButtonId = index.getId(id);
    return (React__default['default'].createElement(styles.BottomSheetFooterWrapper, { pinnedFooter: pinnedFooter, stackedActionButtons: stackedActionButtons, id: id },
        primaryAction && dismissAction && (React__default['default'].createElement(index$1.Button, Object.assign({ role: "button" }, dismissAction, { variant: "ghost", size: "medium", "data-testid": appendTestId('dismiss-button'), "data-trackid": appendTrackId('dismiss-button'), id: appendButtonId('dismiss-button'), fullWidth: stackedActionButtons }), dismissAction.text)),
        primaryAction && (React__default['default'].createElement(index$1.Button, Object.assign({ role: "button" }, primaryAction, { size: "medium", "data-testid": appendTestId('primary-button'), "data-trackid": appendTrackId('primary-button'), id: appendButtonId('primary-button'), fullWidth: stackedActionButtons }), primaryAction.text))));
}

exports.BottomSheetFooter = BottomSheetFooter;
