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

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

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

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