import { CustomType as $CustomType } from "./gleam.mjs";
import * as $hud from "./hud.mjs";
import * as $physics from "./physics.mjs";
import * as $target from "./target.mjs";

export class PlayingState extends $CustomType {
  constructor(targets, physics, hud, mouse, spawn_timer) {
    super();
    this.targets = targets;
    this.physics = physics;
    this.hud = hud;
    this.mouse = mouse;
    this.spawn_timer = spawn_timer;
  }
}
export const PlayingState$PlayingState = (targets, physics, hud, mouse, spawn_timer) =>
  new PlayingState(targets, physics, hud, mouse, spawn_timer);
export const PlayingState$isPlayingState = (value) =>
  value instanceof PlayingState;
export const PlayingState$PlayingState$targets = (value) => value.targets;
export const PlayingState$PlayingState$0 = (value) => value.targets;
export const PlayingState$PlayingState$physics = (value) => value.physics;
export const PlayingState$PlayingState$1 = (value) => value.physics;
export const PlayingState$PlayingState$hud = (value) => value.hud;
export const PlayingState$PlayingState$2 = (value) => value.hud;
export const PlayingState$PlayingState$mouse = (value) => value.mouse;
export const PlayingState$PlayingState$3 = (value) => value.mouse;
export const PlayingState$PlayingState$spawn_timer = (value) =>
  value.spawn_timer;
export const PlayingState$PlayingState$4 = (value) => value.spawn_timer;

export class MainMenu extends $CustomType {}
export const GameState$MainMenu = () => new MainMenu();
export const GameState$isMainMenu = (value) => value instanceof MainMenu;

export class Playing extends $CustomType {
  constructor(state, previous_mouse_pressed) {
    super();
    this.state = state;
    this.previous_mouse_pressed = previous_mouse_pressed;
  }
}
export const GameState$Playing = (state, previous_mouse_pressed) =>
  new Playing(state, previous_mouse_pressed);
export const GameState$isPlaying = (value) => value instanceof Playing;
export const GameState$Playing$state = (value) => value.state;
export const GameState$Playing$0 = (value) => value.state;
export const GameState$Playing$previous_mouse_pressed = (value) =>
  value.previous_mouse_pressed;
export const GameState$Playing$1 = (value) => value.previous_mouse_pressed;

export class GameOver extends $CustomType {
  constructor(final_score, previous_mouse_pressed) {
    super();
    this.final_score = final_score;
    this.previous_mouse_pressed = previous_mouse_pressed;
  }
}
export const GameState$GameOver = (final_score, previous_mouse_pressed) =>
  new GameOver(final_score, previous_mouse_pressed);
export const GameState$isGameOver = (value) => value instanceof GameOver;
export const GameState$GameOver$final_score = (value) => value.final_score;
export const GameState$GameOver$0 = (value) => value.final_score;
export const GameState$GameOver$previous_mouse_pressed = (value) =>
  value.previous_mouse_pressed;
export const GameState$GameOver$1 = (value) => value.previous_mouse_pressed;
