import { EntityState, createEntityAdapter } from '@ngrx/entity';

import { OrderItemListItemDTO } from '@swagger/oms';

export interface DetailsState extends EntityState<OrderItemListItemDTO> {}

export const detailsStateEntityAdapter = createEntityAdapter<OrderItemListItemDTO>({
  selectId: (item) => item.orderItemSubsetId,
});

export const INITIAL_DETAILS_STATE: DetailsState = {
  ...detailsStateEntityAdapter.getInitialState(),
};
