"use client";
import React from "react";
import { Combobox } from "@/components/combobox";
import { useGameStore } from "@/lib/store/game-store";

const getGameVariants = (id: string) => {
  switch (id) {
    case "quiz":
      return [
        {
          label: "Airplains",
          value: "variant_id_1",
        },
        {
          label: "Cars",
          value: "variant_id_0",
        },
        {
          label: "Trains",
          value: "variant_id_2",
        },
      ];

    default:
      return [];
  }
};
function GameVariantSelector() {
  const selectedGame = useGameStore((state) => state.selectedGame);
  const variants = getGameVariants(selectedGame?.id!);
  if (!variants.length) return null;
  return (
    <Combobox
      className="w-full rounded-2xl"
      onSelect={() => {}}
      initialValue={variants[0]?.value}
      data={variants}
    />
  );
}

export default GameVariantSelector;
