"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = __importDefault(require("react"));
const ink_1 = require("ink");
const node_list_1 = require("./node-list");
const helpers_1 = require("./helpers");
class PackagesList extends node_list_1.NodeList {
    constructor(props) {
        super(props);
        this.state = {
            graph: null,
        };
    }
    render() {
        return this.state.graph ? this.state.graph.getPackages().map((pkg) => react_1.default.createElement(ink_1.Box, { key: pkg.getName(), flexDirection: 'row', justifyContent: 'space-between' },
            react_1.default.createElement(ink_1.Text, { bold: true }, pkg.getName()),
            react_1.default.createElement(ink_1.Text, null,
                " ",
                helpers_1.formatPackage(pkg)))) : '';
    }
}
exports.PackagesList = PackagesList;
//# sourceMappingURL=packages-list.js.map