import type { Command } from "@/types/CommandDefinition";
import googleAuthCommand from "./auth";

import useFraudeStore from "@/store/useFraudeStore";

const { updateOutput } = useFraudeStore.getState();

const googleCommands: Command = {
  name: "google",
  description: "Manage Google models",
  usage: "/google <subcommand>",
  action: async (args: string[]) => {
    if (args.length === 0 || args[0] === "list" || args[0] === "models") {
      updateOutput("settings", "/models:google");
      return;
    }
  },
  subcommands: [
    googleAuthCommand,
    {
      name: "list",
      description: "List Google models",
      usage: "/google list",
      action: async () => {
        updateOutput("settings", "/models:google");
      },
    },
  ],
};

export default googleCommands;
