// @bun
import {
  destroyFeatureFlags,
  isFeatureEnabled
} from "./chunk-sb6ft3r2.js";
import {
  createCliLogger,
  source_default
} from "./chunk-t993tmz7.js";
import {
  IS_RELEASE_BUILD
} from "./chunk-px7fts59.js";
import"./chunk-dhs2bg35.js";

// src/commands/adk-flags.ts
var KNOWN_FLAGS = ["enable_agent_0", "enable_guided_setup"];
async function adkFlags(options = {}) {
  const logger = createCliLogger({ format: options.format });
  const results = KNOWN_FLAGS.map((name) => ({
    name,
    enabled: isFeatureEnabled(name, { email: "" })
  }));
  const source = process.env.ADK_FEATURE_FLAGS ? "env" : IS_RELEASE_BUILD ? "release" : "dev (all enabled)";
  const payload = {
    source,
    flags: results.reduce((acc, { name, enabled }) => {
      acc[name] = enabled;
      return acc;
    }, {})
  };
  const lines = [];
  lines.push(`Source: ${process.env.ADK_FEATURE_FLAGS ? source_default.green("env (ADK_FEATURE_FLAGS)") : IS_RELEASE_BUILD ? source_default.cyan("release (hard-coded)") : source_default.green("dev (all enabled)")}`);
  lines.push("");
  lines.push("Flags:");
  for (const { name, enabled } of results) {
    const marker = enabled ? source_default.green("on ") : source_default.red("off");
    lines.push(`  ${marker}  ${name}`);
  }
  logger.info(lines.join(`
`)).result(payload);
  destroyFeatureFlags();
}
export {
  adkFlags
};
