import { Selector, createSelector } from '@ngrx/store';

export interface State {
  windowSize: {
    width: number;
    height: number;
  };
}

export const initialState: State = {
  windowSize: {
    width: 0,
    height: 0
  }
};

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