"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const assert = require("assert");
const mynah_ui_1 = require("@aws/mynah-ui");
const pairProgramming_1 = require("./pairProgramming");
describe('pairProgramming', () => {
    describe('programmerModeCard', () => {
        it('has correct properties', () => {
            assert.equal(pairProgramming_1.programmerModeCard.type, mynah_ui_1.ChatItemType.ANSWER);
            assert.equal(pairProgramming_1.programmerModeCard.title, 'NEW FEATURE');
            assert.equal(pairProgramming_1.programmerModeCard.messageId, 'programmerModeCardId');
            assert.equal(pairProgramming_1.programmerModeCard.fullWidth, true);
            assert.equal(pairProgramming_1.programmerModeCard.canBeDismissed, true);
            assert.ok(pairProgramming_1.programmerModeCard.body?.includes('Amazon Q can now help'));
            assert.equal(pairProgramming_1.programmerModeCard.header?.icon, 'code-block');
            assert.equal(pairProgramming_1.programmerModeCard.header?.iconStatus, 'primary');
        });
    });
    describe('pairProgrammingPromptInput', () => {
        it('has correct properties', () => {
            assert.equal(pairProgramming_1.pairProgrammingPromptInput.type, 'switch');
            assert.equal(pairProgramming_1.pairProgrammingPromptInput.id, 'pair-programmer-mode');
            assert.equal(pairProgramming_1.pairProgrammingPromptInput.tooltip, 'Turn OFF agentic coding');
            if (pairProgramming_1.pairProgrammingPromptInput.type === 'switch') {
                // Type guard for switch type
                assert.equal(pairProgramming_1.pairProgrammingPromptInput.alternateTooltip, 'Turn ON agentic coding');
            }
            assert.equal(pairProgramming_1.pairProgrammingPromptInput.value, 'true');
            assert.equal(pairProgramming_1.pairProgrammingPromptInput.icon, 'code-block');
        });
    });
    describe('pairProgrammingModeOn', () => {
        it('has correct properties', () => {
            assert.equal(pairProgramming_1.pairProgrammingModeOn.type, mynah_ui_1.ChatItemType.DIRECTIVE);
            assert.equal(pairProgramming_1.pairProgrammingModeOn.contentHorizontalAlignment, 'center');
            assert.equal(pairProgramming_1.pairProgrammingModeOn.fullWidth, true);
            assert.equal(pairProgramming_1.pairProgrammingModeOn.body, 'Agentic coding - ON');
        });
    });
    describe('pairProgrammingModeOff', () => {
        it('has correct properties', () => {
            assert.equal(pairProgramming_1.pairProgrammingModeOff.type, mynah_ui_1.ChatItemType.DIRECTIVE);
            assert.equal(pairProgramming_1.pairProgrammingModeOff.contentHorizontalAlignment, 'center');
            assert.equal(pairProgramming_1.pairProgrammingModeOff.fullWidth, true);
            assert.equal(pairProgramming_1.pairProgrammingModeOff.body, 'Agentic coding - OFF');
        });
    });
    describe('testRerouteCard', () => {
        it('has correct properties', () => {
            assert.equal(pairProgramming_1.testRerouteCard.type, mynah_ui_1.ChatItemType.ANSWER);
            assert.equal(pairProgramming_1.testRerouteCard.border, true);
            assert.equal(pairProgramming_1.testRerouteCard.header?.padding, true);
            assert.equal(pairProgramming_1.testRerouteCard.header?.iconForegroundStatus, 'warning');
            assert.equal(pairProgramming_1.testRerouteCard.header?.icon, mynah_ui_1.MynahIcons.INFO);
            assert.ok(pairProgramming_1.testRerouteCard.header?.body?.includes('generate unit tests'));
            assert.ok(pairProgramming_1.testRerouteCard.body?.includes("You don't need to explicitly use /test"));
        });
    });
    describe('docRerouteCard', () => {
        it('has correct properties', () => {
            assert.equal(pairProgramming_1.docRerouteCard.type, mynah_ui_1.ChatItemType.ANSWER);
            assert.equal(pairProgramming_1.docRerouteCard.border, true);
            assert.equal(pairProgramming_1.docRerouteCard.header?.padding, true);
            assert.equal(pairProgramming_1.docRerouteCard.header?.iconForegroundStatus, 'warning');
            assert.equal(pairProgramming_1.docRerouteCard.header?.icon, mynah_ui_1.MynahIcons.INFO);
            assert.ok(pairProgramming_1.docRerouteCard.header?.body?.includes('generate documentation'));
            assert.ok(pairProgramming_1.docRerouteCard.body?.includes("You don't need to explicitly use /doc"));
        });
    });
    describe('devRerouteCard', () => {
        it('has correct properties', () => {
            assert.equal(pairProgramming_1.devRerouteCard.type, mynah_ui_1.ChatItemType.ANSWER);
            assert.equal(pairProgramming_1.devRerouteCard.border, true);
            assert.equal(pairProgramming_1.devRerouteCard.header?.padding, true);
            assert.equal(pairProgramming_1.devRerouteCard.header?.iconForegroundStatus, 'warning');
            assert.equal(pairProgramming_1.devRerouteCard.header?.icon, mynah_ui_1.MynahIcons.INFO);
            assert.ok(pairProgramming_1.devRerouteCard.header?.body?.includes('generate code'));
            assert.ok(pairProgramming_1.devRerouteCard.body?.includes("You don't need to explicitly use /dev"));
        });
    });
    describe('createRerouteCard', () => {
        it('returns testRerouteCard for /test command', () => {
            const result = (0, pairProgramming_1.createRerouteCard)('/test');
            assert.deepEqual(result, pairProgramming_1.testRerouteCard);
        });
        it('returns docRerouteCard for /doc command', () => {
            const result = (0, pairProgramming_1.createRerouteCard)('/doc');
            assert.deepEqual(result, pairProgramming_1.docRerouteCard);
        });
        it('returns devRerouteCard for /dev command', () => {
            const result = (0, pairProgramming_1.createRerouteCard)('/dev');
            assert.deepEqual(result, pairProgramming_1.devRerouteCard);
        });
        it('returns devRerouteCard for unknown command', () => {
            const result = (0, pairProgramming_1.createRerouteCard)('/unknown');
            assert.deepEqual(result, pairProgramming_1.devRerouteCard);
        });
        it('returns devRerouteCard for empty string', () => {
            const result = (0, pairProgramming_1.createRerouteCard)('');
            assert.deepEqual(result, pairProgramming_1.devRerouteCard);
        });
    });
});
//# sourceMappingURL=pairProgramming.test.js.map