"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 ink_divider_1 = __importDefault(require("ink-divider"));
exports.ActionPanel = (services, packages, selected) => {
    if (!selected) {
        return react_1.default.createElement(ink_1.Text, null, "Use up and down arrow to navigate");
    }
    const isPackage = packages.some(p => p.name === selected);
    const selectedNode = isPackage ? packages.find(p => p.name === selected) : services.find(p => p.name === selected);
    return react_1.default.createElement(ink_1.Box, null,
        react_1.default.createElement(ink_1.Text, { bold: true }, selectedNode.name),
        react_1.default.createElement(ink_divider_1.default, null),
        react_1.default.createElement(ink_1.Text, null,
            "version: ",
            selectedNode.version),
        react_1.default.createElement(ink_1.Text, null,
            "allocated port: ",
            selectedNode.version),
        react_1.default.createElement(ink_1.Text, null,
            "compilation status: ",
            selectedNode.version),
        react_1.default.createElement(ink_1.Text, null,
            "start status: ",
            selectedNode.version),
        react_1.default.createElement(ink_1.Text, null,
            "last compilation took: ",
            selectedNode.version),
        react_1.default.createElement(ink_1.Text, null,
            "last start took: ",
            selectedNode.version),
        react_1.default.createElement(ink_divider_1.default, null),
        react_1.default.createElement(ink_1.Text, null, "(l): display service logs"),
        react_1.default.createElement(ink_1.Text, null, "(s): stop service"),
        react_1.default.createElement(ink_1.Text, null, "(r): restart service"),
        react_1.default.createElement(ink_1.Text, null, "(b): recompile service"),
        react_1.default.createElement(ink_1.Text, null, "(e): enable service"),
        react_1.default.createElement(ink_1.Text, null, "(d): disable service"),
        react_1.default.createElement(ink_1.Text, null, "(t): run service tests"),
        react_1.default.createElement(ink_1.Text, null, "(p): package service"),
        react_1.default.createElement(ink_1.Text, null, "($): deploy service"),
        react_1.default.createElement(ink_1.Text, null, "(escape): close menu"));
};
//# sourceMappingURL=action-pannel.js.map