import { Task, Assignee, Typist, TypistGroup } from "../../api/api";
import {
  DirectionType,
  DisplayInfoType,
  SortableColumnType,
} from "./constants";
import { BackupTask } from "./types";

export interface DictationState {
  domain: Domain;
  apps: Apps;
}

export interface Domain {
  limit: number;
  offset: number;
  total: number;
  tasks: Task[];
  typists: Typist[];
  typistGroups: TypistGroup[];
  backup: Backup;
}

export interface Apps {
  displayInfo: DisplayInfoType;
  direction: DirectionType;
  paramName: SortableColumnType;
  selectedTask?: Task;
  selectedFileTask?: Task;
  assignee: {
    selected: Assignee[];
    pool: Assignee[];
  };
  isLoading: boolean;
  isBackupListLoading: boolean;
  isDownloading: boolean;
}

export interface Backup {
  tasks: BackupTask[];
  offset: number;
  total: number;
}
