1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import React from 'react';
6 import { CustomStyleRulesCallback } from 'common/custom-theme';
7 import { Stepper, Step, StepLabel, StepContent } from '@mui/material';
8 import { WithStyles } from '@mui/styles';
9 import withStyles from '@mui/styles/withStyles';
10 import { RunProcessFirstStepDataProps, RunProcessFirstStepActionProps, RunProcessFirstStep } from 'views/run-process-panel/run-process-first-step';
11 import { RunProcessSecondStepForm } from './run-process-second-step';
13 export type RunProcessPanelRootDataProps = {
15 } & RunProcessFirstStepDataProps;
17 export type RunProcessPanelRootActionProps = RunProcessFirstStepActionProps & {
18 runProcess: () => void;
21 type RunProcessPanelRootProps = RunProcessPanelRootDataProps & RunProcessPanelRootActionProps;
23 type CssRules = 'stepper';
25 const styles: CustomStyleRulesCallback<CssRules> = theme => ({
31 export const RunProcessPanelRoot = withStyles(styles)(
32 ({ runProcess, currentStep, onSearch, onSetStep, onSetWorkflow, workflows, selectedWorkflow, classes }: WithStyles<CssRules> & RunProcessPanelRootProps) =>
33 <Stepper activeStep={currentStep} orientation="vertical" elevation={2} className={classes.stepper}>
35 <StepLabel>Choose a workflow</StepLabel>
39 selectedWorkflow={selectedWorkflow}
42 onSetWorkflow={onSetWorkflow} />
46 <StepLabel>Select inputs</StepLabel>
48 <RunProcessSecondStepForm
49 goBack={() => onSetStep(0)}
50 runProcess={runProcess} />