import { Stepper, Box } from '@wix/design-system';
import React from 'react';
import { observer } from 'mobx-react-lite';
const STEPPER_INDEX = {
    upload: 0,
    configuration: 1,
    progress: 2,
};
function getStepperSteps(currentStep, t) {
    const activeIndex = STEPPER_INDEX[currentStep];
    return [
        { text: t('cairo.import.stepper.upload') },
        { text: t('cairo.import.stepper.matchFields') },
    ].map((step, index) => ({
        ...step,
        type: (index < activeIndex
            ? 'completed'
            : index > activeIndex
                ? 'disabled'
                : 'normal'),
    }));
}
function _ImportStepper({ state, removeContentPadding }) {
    const activeStep = STEPPER_INDEX[state.currentStep];
    const steps = getStepperSteps(state.currentStep, state.translate);
    const contentPadding = removeContentPadding ? undefined : 'SP4';
    const handleStepClick = (stepIndex) => {
        if (stepIndex < activeStep) {
            state.discardAndGoBack();
        }
    };
    return (React.createElement(Box, { paddingLeft: contentPadding, paddingRight: contentPadding },
        React.createElement(Stepper, { activeStep: activeStep, steps: steps, onClick: handleStepClick })));
}
export const ImportStepper = observer(_ImportStepper);
//# sourceMappingURL=ImportStepper.js.map