/*
 * MIT License
 *
 * Copyright (c) 2019 Red Hat, Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
/**
 * Attribution: https://github.com/patternfly/patternfly-react/blob/%40patternfly/react-core%404.202.25/packages/react-core/src/components/Wizard/WizardFooterInternal.tsx
 * Additions by:
 *   - @starpit 20220412 Added `leftActions` and `rightContent` properties
 */
import React from 'react';
import { css } from '@patternfly/react-styles';
import styles from '@patternfly/react-styles/css/components/Wizard/wizard';
import Button from '../../../../spi/Button';
import '../../../../../../web/scss/components/Wizard/Footer.scss';
export const WizardFooterInternal = ({ onNext, onBack, onClose, isValid, firstStep, activeStep, nextButtonText, backButtonText, cancelButtonText, boxShadow, leftButtons, rightButtons, topContent }) => (React.createElement("footer", { className: css(styles.wizardFooter) + ' kui--wizard-footer', "data-has-box-shadow": boxShadow || undefined },
    topContent && React.createElement("span", { className: "kui--wizard-footer--top" }, topContent),
    React.createElement("span", { className: "kui--wizard-footer--bottom" },
        React.createElement("span", { className: "kui--wizard-footer--bottom-left" },
            leftButtons && leftButtons.map((_, idx) => React.createElement(Button, Object.assign({ key: idx }, _))),
            React.createElement(Button, { variant: "primary", type: "submit", onClick: onNext, isDisabled: !isValid }, nextButtonText),
            activeStep && !activeStep.hideBackButton && (React.createElement(Button, { variant: "secondary", onClick: onBack, isDisabled: firstStep }, backButtonText)),
            activeStep && !activeStep.hideCancelButton && (React.createElement("div", { className: styles.wizardFooterCancel },
                React.createElement(Button, { variant: "link", onClick: onClose }, cancelButtonText)))),
        rightButtons && (React.createElement("span", { className: "kui--wizard-footer--bottom-right" }, rightButtons && rightButtons.map((_, idx) => React.createElement(Button, Object.assign({ key: idx }, _))))))));
WizardFooterInternal.displayName = 'WizardFooterInternal';
export default WizardFooterInternal;
//# sourceMappingURL=Footer.js.map