// @flow

export type State = {
  x: ?number,
  y: ?number,
  width: number,
  height: number,
  windowHidden: boolean,
  isMaximized: ?boolean,
  isFullScreen: ?boolean,
  displayBounds: ?any,
  tab: ?string,
  dockHidden: boolean,
  openAtLoginSet: boolean,
}

export type Config = {
  path: string,
  eventHandlingDelay: number
}

export type Options = {
  defaultWidth: number,
  defaultHeight: number
}

export type Managed = {
  winRef: ?any,
  debounceChangeTimer: ?number,
  showHandlers: Array<function>,
  resizeHandlers: Array<function>,
  moveHandlers: Array<function>,
  closeHandlers: Array<function>,
  closedHandlers: Array<function>,
}

declare export default class AppState {
  state: State,
  config: Config,
  managed: Managed,
  saveState: () => void,
  manageWindow: (window: any) => void,
  checkOpenAtLogin: () => void,
}
