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

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

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

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