import { defineCommand } from '@kb-labs/sdk';
import { loadBaseline, buildBaselineReport } from '@kb-labs/qa-core';

// src/cli/commands/baseline-status.ts
var baseline_status_default = defineCommand({
  id: "baseline:status",
  description: "Show current baseline status",
  handler: {
    async execute(ctx, input) {
      const { ui } = ctx;
      const flags = input.flags ?? input;
      const rootDir = ctx.cwd;
      const baseline = loadBaseline(rootDir);
      if (flags.json) {
        ui?.json?.(baseline ?? { status: "no-baseline" });
        return { exitCode: 0 };
      }
      const sections = buildBaselineReport(baseline);
      for (const section of sections) {
        ui?.success?.(section.header, {
          title: section.header,
          sections: [{ header: "", items: section.lines }]
        });
      }
      return { exitCode: 0 };
    }
  }
});

export { baseline_status_default as default };
//# sourceMappingURL=baseline-status.js.map
//# sourceMappingURL=baseline-status.js.map