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

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

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

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