import { Selector, createSelector } from '@ngrx/store';
import { RegViewResponse } from '@ucap-webmessenger/protocol-option';

export interface State {
  reg?: RegViewResponse;
}

export const initialState: State = {
  reg: null
};

export function selectors<S>(selector: Selector<any, State>) {
  return {
    reg: createSelector(
      selector,
      (state: State) => state.reg
    )
  };
}
