import { create } from "zustand";
import type { IMinigame } from "@/game-engien";
import type { GameConfig } from "../validations/game";

type GameStore = {
  selectedGame?: IMinigame;
  setSelectedGame: (game?: IMinigame) => void;
  gameConfig: GameConfig;
  setGameConfig: (config: GameConfig) => void;
};

export const useGameStore = create<GameStore>((set) => ({
  selectedGame: undefined,
  setSelectedGame: (game) => set({ selectedGame: game }),
  gameConfig: {} as GameConfig,
  setGameConfig: (config) => set({ gameConfig: config }),
}));
