import { Search } from './search.model';
import { ItemDTO } from '@swagger/cat';
import { CustomerSearch } from './customer-search.model';
import { DisplayOrderDTO } from '@swagger/oms';
import { ProductSerachFilters } from './product-search-filters.model';
import { ShelfSearch } from './shelf-search.modal';
import { ProcessUserData } from './process-user-data.model';

export interface Process {
  id: number;
  uniqueIdentifier?: number;
  name: string;
  new: boolean;
  loading: boolean;
  currentBreadcrumbsId: string;
  currentRoute: string;
  currentRouteQueryParams: any;
  previusBreadcrumbsId: string;
  previousRoute: string;
  search: Search;
  selectedItem: ItemDTO;
  preventLoading: boolean;
  productScrollTo: number;
  customerIds: number[];
  activeCustomer: number;
  detailsCustomer: number;
  finishedOrderCustomer: number;
  customerSearch: CustomerSearch;
  cartId: number;
  customerFormState: string;
  finishedOrder: { failedItemIds: { id: number; type: number }[]; displayOrder: DisplayOrderDTO[] };
  ordersOpenend: boolean;
  closeDirectlyTab: boolean;
  articleSearchErrorStatus: boolean;
  productSearchFilters: ProductSerachFilters;
  shelfSearch: ShelfSearch;
  onlineCustomerCreationError?: { error: boolean; invalidProperties: any };
  userData: ProcessUserData;
  customerNotificationFlag?: boolean;
}

export class CustomerFormState {
  static CREATE = 'create';
  static MISSING_DELIVERY = 'missing_delivery';
  static MISSING_ONLINE = 'missing_online';
}
