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

// tslint:disable-next-line: no-empty-interface
export interface State {
  loginInfo: LoginResponse | null;
}

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

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