import { Box } from '@mui/material' import { AnimatePresence } from 'motion/react' import * as m from 'motion/react-m' import type { JSX } from 'react' import type { ExecutionRow } from '../StepActions/executionRows.js' import { renderExecutionRow } from '../StepActions/executionRows.js' const ROW_STAGGER = 0.06 const rowTransition = { duration: 0.3, ease: [0.19, 1, 0.22, 1] as const } const rowExitTransition = { duration: 0.2, ease: [0.215, 0.61, 0.355, 1] as const, } interface ExecutionChecklistProps { rows: ExecutionRow[] } export function ExecutionChecklist({ rows, }: ExecutionChecklistProps): JSX.Element | null { if (rows.length === 0) { return null } const lastActionIndex = rows.findLastIndex((r) => r.kind === 'action') return ( {rows.map((row, index) => ( {renderExecutionRow(row, index === lastActionIndex)} ))} ) }