import { RPCClientError } from '@loafer/ng-rpc';
import { Notification } from '@overflow/commons-typescript/model/notification';
import { Selector, createSelector } from '@ngrx/store';
import { createEntityAdapter, EntityState } from '@loafer/ng-entity';

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

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