import { Immutable } from 'immer';
import games, { GameState } from './game';
import gameModels, { GameModelState } from './gameModel';
import global, { GlobalState } from './globalState';
import pages, { PageState } from './pageState';
import players, { PlayerState } from './player';
import teams, { TeamState } from './teams';
import variableDescriptors, { VariableDescriptorState } from './variableDescriptor';
import variableInstances, { VariableInstanceState } from './variableInstance';

export interface State {
  gameModels: Immutable<GameModelState>;
  games: Immutable<GameState>;
  variableDescriptors: Immutable<VariableDescriptorState>;
  variableInstances: Immutable<VariableInstanceState>;
  global: Immutable<GlobalState>;
  pages: Immutable<PageState>;
  players: Immutable<PlayerState>;
  teams: Immutable<TeamState>;
}

export default {
  gameModels,
  variableDescriptors,
  variableInstances,
  global,
  pages,
  games,
  players,
  teams,
};

import gameModels, { GameModelState } from './gameModel';
import variableDescriptors, {
  VariableDescriptorState,
} from './variableDescriptor';
import variableInstances, { VariableInstanceState } from './variableInstance';
import global, { GlobalState } from './globalState';
import pages, { PageState } from './pageState';
import games, { GameState } from './game';
import players, { PlayerState } from './player';
import teams, { TeamState } from './teams';

export interface State {
  gameModels: Readonly<GameModelState>;
  games: Readonly<GameState>;
  variableDescriptors: Readonly<VariableDescriptorState>;
  variableInstances: Readonly<VariableInstanceState>;
  global: Readonly<GlobalState>;
  pages: Readonly<PageState>;
  players: Readonly<PlayerState>;
  teams: Readonly<TeamState>;
}

export default {
  gameModels,
  variableDescriptors,
  variableInstances,
  global,
  pages,
  games,
  players,
  teams,
};

Revert "State Immutable (deep readonly) instead of RO"
Revert "State Immutable (deep readonly) instead of RO"

This reverts commit 8bf9bdead9626ef3ce31c82a7e7bc0aec5b3c61a.
