import { CartEntry } from './cart-entry.model';
import { User } from './user.model';
import { Process } from './process.model';
import { ItemDTO, ListResponseArgsOfItemDTO } from '@swagger/cat';
import { RecentArticleSearch } from './recent-article-search.model';
import { ProcessBreadcrumb } from './process-breadcrumb.model';
import { ModuleSwitcher } from './app-switcher.enum';
import { Filter } from './filter.model';
import { ProcessSelectedFilters } from './process-selected-filters.model';
import { CollectingShelfOrder } from './collecting-shelf-order.model';
import { OrderDTO } from '@swagger/oms';
import { FilterType } from './filter-type.enum';
import { CustomerSearchResponse } from './customer-search-response.model';
import { GoodsIn } from './goods-in.model';
import { BranchProcess } from './branch-process.model';
import { Remission } from './remission.model';

export interface UserStateSyncData {
  version?: number;
  currentProcesssId?: number;
  activeModule?: ModuleSwitcher;
  recentArticles?: RecentArticleSearch[];
  processIds?: number[];
  processes?: { [id: number]: Process };
  processesBreadcrumbs?: ProcessBreadcrumb;
  activeCrumbs?: { [id: number]: string };
  previusMenuPath?: { [id: number]: { crumb: string; path: string }[] };
  cartEntries?: { [key: number]: CartEntry };
  carts?: { [key: number]: number[] };
  customers?: { [id: number]: User };
  lastCreatedCustomerId?: number;
  products?: { [key: number]: { [key: number]: ItemDTO } };
  shelfOrders?: { [key: number]: { [key: number]: CollectingShelfOrder } };
  editOrder?: { [id: number]: OrderDTO };
  cachedSearchResults?: { [id: number]: { result: CollectingShelfOrder[]; hits: number } };
  useCache?: { [id: number]: boolean };
  cachedProductResults?: { [id: number]: { result: ListResponseArgsOfItemDTO } };
  cachedCustomerSearch?: { [id: number]: CustomerSearchResponse };
  filters?: Filter[];
  processesSelectedFilters?: ProcessSelectedFilters[];
  negativeProcessesSelectedFilters?: ProcessSelectedFilters[];
  dropdownFilters?: { [id: number]: Filter[] };
  negativeDropdownFilters?: { [id: number]: Filter[] };
  filterType?: { [id: number]: FilterType };
  branchProcess?: BranchProcess;
  goodsIn?: GoodsIn;
  remission?: Remission;
  formsState?: { [id: number]: { [key: string]: string } };
}
