import type { SelectProps } from '@mui/material/Select';

type NullCondition = '';
type NumberCondition = '<' | '>' | '=' | '!=' | NullCondition;
type StringCondition = 'match' | 'notmatch' | NullCondition;
type FormStatus = 'original' | 'new' | 'update' | 'error';
export type AllCondition = NumberCondition | StringCondition | NullCondition;
export type LogicForm = {
  id: number | null;
  order: number;
  condition: AllCondition;
  value: string | number;
  next_task_id: number | '';
  status: FormStatus;
  conditions?: Array<{
    condition: string;
    value: string;
  }>;};

export type NextTask = { value: number; name: string };

export type TaskSelectProps = {
  error: boolean;
  options: NextTask[];
  value: number | '';
  onChange: SelectProps['onChange'];
};
