import { createSelector, createFeatureSelector } from '@ngrx/store';
import { StaffView } from '../models';
import { AppState } from './app.state';

export const selectState = createFeatureSelector<AppState>('myStaffs');

// 2. Create a selector for a specific piece of state
export const selectStaff = createSelector(
  selectState,
  (state: AppState) => state.staffs
);

// 2. Create a selector for a specific piece of state
export const selectStaffLoaded = createSelector(
  selectState,
  (state: AppState) => state.staffloaded);
