const TEST_AUTH_TOKEN = "test-auth-token-123";
jest.mock("../../common/output.js", () => ({
    __esModule: true,
    default: jest.fn((argv) => argv),
    printResultToConsoleAndExitGracefully: jest.fn().mockResolvedValue(undefined),
    printTableToConsoleAndExitGracefully: jest.fn().mockResolvedValue(undefined),
    printResultToConsole: jest.fn().mockResolvedValue(undefined),
    printDiagnosticsToConsole: jest.fn(),
    printWarningToConsole: jest.fn(),
    printSpinnerToConsole: jest.fn().mockReturnValue({ stop: jest.fn() }),
    printCriticalFailureToConsoleAndExit: jest
        .fn()
        .mockRejectedValue(new Error("Process would exit")),
    textOrJson: jest.fn((text) => {
        try {
            return JSON.parse(text);
        }
        catch {
            return text;
        }
    }),
}));
jest.mock("../../common/analytics/lib.js", () => ({
    captureEvent: jest.fn().mockResolvedValue(undefined),
}));
jest.mock("../../common/middleware/authentication.js", () => ({
    authenticate: jest.fn((argv) => {
        return { ...argv, authToken: TEST_AUTH_TOKEN };
    }),
}));
jest.mock("@inquirer/prompts", () => ({
    select: jest.fn().mockImplementation(({ choices }) => {
        if (Array.isArray(choices) && choices.length > 0) {
            return Promise.resolve(choices[0].value);
        }
        return Promise.resolve("test-default");
    }),
}));
jest.mock("../../common/middleware/user-configuration.js", () => ({
    configure: jest.fn((argv) => argv),
}));
jest.mock("../../common/middleware/user-identification.js", () => ({
    identify: jest.fn((argv) => argv),
}));
jest.mock("../../common/validators/lib.js", () => ({
    YargsChecker: jest.fn().mockImplementation(() => ({
        check: jest.fn().mockResolvedValue(true),
    })),
}));
jest.mock("../../common/handler.js", () => ({
    groupHandler: jest.fn(),
}));
jest.mock("../../login/tokens.js", () => ({
    getAuthToken: jest.fn().mockResolvedValue(TEST_AUTH_TOKEN),
    refreshAccessToken: jest.fn().mockResolvedValue({
        access_token: TEST_AUTH_TOKEN,
        id_token: "mock-id-token",
        expires_in: 3600,
        token_type: "Bearer",
        scope: "openid profile email",
    }),
}));
jest.mock("../../login/server.js", () => ({
    startAuthServer: jest.fn().mockResolvedValue("mock-auth-code"),
}));
export {};
//# sourceMappingURL=jest-mocks-setup.js.map