// Copyright (C) The Arvados Authors. All rights reserved. // // SPDX-License-Identifier: AGPL-3.0 import * as React from 'react'; import { StyleRulesCallback, withStyles, Grid, Button, WithStyles, List, ListItem, ListItemText, ListItemIcon, Tabs, Tab } from '@material-ui/core'; import { ArvadosTheme } from '~/common/custom-theme'; import { WorkflowResource } from '~/models/workflow'; import { WorkflowIcon } from '~/components/icon/icon'; import { WorkflowDetailsCard } from '../workflow-panel/workflow-description-card'; type CssRules = 'rightGrid' | 'list' | 'listItem' | 'itemSelected' | 'listItemText' | 'listItemIcon'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ rightGrid: { borderLeft: `1px solid ${theme.palette.grey["300"]}` }, list: { maxHeight: 300, position: 'relative', overflow: 'auto' }, listItem: { padding: theme.spacing.unit, }, itemSelected: { backgroundColor: 'rgba(3, 190, 171, 0.3) !important' }, listItemText: { fontSize: '0.875rem' }, listItemIcon: { color: theme.customs.colors.red900 } }); export interface RunProcessFirstStepDataProps { workflows: WorkflowResource[]; selectedWorkflow: WorkflowResource | undefined; } export interface RunProcessFirstStepActionProps { onSetStep: (step: number) => void; onSetWorkflow: (workflow: WorkflowResource) => void; } type RunProcessFirstStepProps = RunProcessFirstStepDataProps & RunProcessFirstStepActionProps & WithStyles; export const RunProcessFirstStep = withStyles(styles)( ({ onSetStep, onSetWorkflow, workflows, selectedWorkflow, classes }: RunProcessFirstStepProps) => {/* TODO: add filters */} {workflows.map(workflow => ( onSetWorkflow(workflow)}> ))} );