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

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

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

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