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

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

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

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