import {
  AuthenticatedCommand
} from "./chunk-G2JISDKX.js";
import {
  require_lib
} from "./chunk-XECLOG6B.js";
import {
  __toESM,
  init_cjs_shims
} from "./chunk-7GH3YGSC.js";

// src/commands/query/ledgerAccounts.ts
init_cjs_shims();
var import_core = __toESM(require_lib(), 1);
var QueryLedgerAccounts = class extends AuthenticatedCommand {
  static {
    this.description = "Get accounts for ledger within your workspace by ID";
  }
  static {
    this.examples = ["<%= config.bin %> <%= command.id %>"];
  }
  static {
    this.flags = {
      ledger: import_core.Flags.string({
        char: "l",
        description: "Ledger ID to retrieve accounts for",
        required: true
      }),
      first: import_core.Flags.integer({
        description: "Number of ledger accounts to retrieve in each page"
      }),
      after: import_core.Flags.string({
        description: "Cursor to paginate through ledger accounts"
      })
    };
  }
  async run() {
    try {
      await this.sdk.ListLedgerAccounts({
        ledgerId: this.flags.ledger,
        first: this.flags.first,
        after: this.flags.after
      });
    } catch (e) {
      this.exit(1);
    }
  }
};

export {
  QueryLedgerAccounts
};
