import { RPCClientError } from '@loafer/ng-rpc';

import { Selector, createSelector } from '@ngrx/store';
import { createEntityAdapter, EntityState } from '@loafer/ng-entity';
import { MetaVendorCrawler } from '@overflow/commons-typescript/model/meta';

export const metaVendorCrawlerEntityAdapter = createEntityAdapter<MetaVendorCrawler, RPCClientError>();
export interface State extends EntityState<MetaVendorCrawler, RPCClientError> {
}
export const initialState: State = metaVendorCrawlerEntityAdapter.getInitialState({
});

export function getSelectors(selector: Selector<any, State>) {
  return {
    ...metaVendorCrawlerEntityAdapter.getSelectors(selector),
  };
}
