import { isCommandSupported } from "../agent-backend.js";
const ALWAYS_OVERLAY = {
  search: "search",
  find: "search",
  // alias
  login: "login",
  logout: "logout",
  connect: "connect",
  model: "model-selector",
  reasoning: "reasoning",
  resume: "session-selector",
  switch: "session-selector",
  stream: "stream-selector",
  sounds: "sounds-selector",
  tools: "tool-browser",
  mcp: "mcp-server-list",
  rename: "session-rename",
  context: "context-stats",
  ctx: "context-stats",
  // alias
  tokens: "context-stats",
  // alias
  export: "export-wizard",
  plugin: "plugin-manager"
};
const NO_ARGS_OVERLAY = {
  session: "session-subcommand-selector",
  log: "log-level-selector",
  prompts: "prompt-list"
};
function getCommandOverlay(command, args, agent) {
  if (!isCommandSupported(agent, command)) {
    return null;
  }
  const alwaysOverlay = ALWAYS_OVERLAY[command];
  if (alwaysOverlay) return alwaysOverlay;
  if (args.length === 0) {
    const noArgsOverlay = NO_ARGS_OVERLAY[command];
    if (noArgsOverlay) return noArgsOverlay;
  }
  return null;
}
function isInteractiveCommand(command) {
  return command in ALWAYS_OVERLAY || command in NO_ARGS_OVERLAY;
}
export {
  getCommandOverlay,
  isInteractiveCommand
};
