"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const ExecutionBoard_1 = require("./orchestrator/ExecutionBoard");
function assert(condition, message) {
    if (!condition)
        throw new Error(message);
}
async function main() {
    const board = new ExecutionBoard_1.ExecutionBoard();
    board.add({
        id: 'board-phase6-smart',
        title: 'Testar board inteligente',
        ownerRole: 'coo',
        status: 'active',
        priority: 'high',
        dependencies: ['dep-1'],
        slaHours: 24,
        notes: 'item de teste'
    });
    board.updateStatus('board-phase6-smart', 'blocked', 'Dependência externa pendente');
    const item = board.getAll().find((entry) => entry.id === 'board-phase6-smart');
    assert(!!item, 'board item should exist');
    assert(item.blockerReason === 'Dependência externa pendente', 'board should persist blocker reason');
    assert(Array.isArray(item.dependencies) && item.dependencies.length === 1, 'board should persist dependencies');
    assert(typeof item.ageHours === 'number', 'board should expose age hours');
    console.log('TEST_PHASE6_BOARD_OK');
}
main().catch((error) => {
    console.error(error.message || error);
    process.exit(1);
});
