import { captureEvent } from "../../common/analytics/lib.js";
import { authenticate } from "../../common/middleware/authentication.js";
import { confirmLinkedConfig } from "../../common/middleware/confirm-linked-config.js";
import { fetchAccount } from "../../common/middleware/get-account-param.js";
import { fetchProject } from "../../common/middleware/get-project-param.js";
import { configure } from "../../common/middleware/user-configuration.js";
import { identify } from "../../common/middleware/user-identification.js";
import { list } from "../../mtls-certificates/list/handler.js";
export default {
    desc: "Lists all mTLS certificates for a project",
    command: "list",
    builder: (yargs) => {
        return yargs
            .usage("$0 mtls-certificates list [options]")
            .option("api-key", {
            type: "string",
            describe: "The API Key from Zuplo",
            envVar: "API_KEY",
            alias: "apikey",
        })
            .option("account", {
            type: "string",
            describe: "The account name",
        })
            .option("project", {
            type: "string",
            describe: "The project name",
        })
            .example([
            [
                "$0 mtls-certificates list",
                "List all mTLS certificates for your project",
            ],
            [
                "$0 mtls-certificates list --account my-account --project my-project",
                "Explicitly specify the account and project",
            ],
        ])
            .middleware([
            authenticate,
            configure,
            confirmLinkedConfig,
            fetchAccount,
            fetchProject,
            identify,
        ]);
    },
    handler: async (argv) => {
        await captureEvent({ argv, event: "zuplo mtls-certificate list" });
        await list(argv);
    },
};
//# sourceMappingURL=list.js.map