"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.LernaStatus = void 0;
const react_1 = __importStar(require("react"));
const ink_1 = require("ink");
const store_1 = require("../state/store");
const Spinner = require('ink-spinner');
class LernaStatus extends react_1.Component {
    render() {
        const lerna = this.props.lerna;
        switch (lerna.status) {
            case store_1.BootstrapStatus.READY:
            case store_1.BootstrapStatus.BUILDING_GRAPH:
                return (react_1.default.createElement(ink_1.Box, { flexDirection: 'column', marginTop: 1, marginBottom: 1 },
                    react_1.default.createElement(ink_1.Text, null,
                        react_1.default.createElement(Spinner, { type: 'dots' }),
                        react_1.default.createElement(ink_1.Text, null, " "),
                        react_1.default.createElement(ink_1.Text, null, "Parsing dependency graph"))));
            case store_1.BootstrapStatus.BOOTSTRAPPING:
                return (react_1.default.createElement(ink_1.Box, { flexDirection: 'column', marginTop: 1, marginBottom: 1 },
                    react_1.default.createElement(ink_1.Text, null,
                        react_1.default.createElement(ink_1.Color, { green: true }, "\u2713"),
                        react_1.default.createElement(ink_1.Text, null, " "),
                        react_1.default.createElement(ink_1.Text, null, "Dependency graph parsed")),
                    react_1.default.createElement(ink_1.Text, null,
                        react_1.default.createElement(Spinner, { type: 'dots' }),
                        react_1.default.createElement(ink_1.Text, null, " "),
                        react_1.default.createElement(ink_1.Text, null, "Bootstrapping dependencies \uD83D\uDCE6"),
                        react_1.default.createElement(ink_1.Text, null, " "),
                        react_1.default.createElement(ink_1.Color, { grey: true }, lerna.version ? 'using lerna ' + lerna.version : ''))));
            case store_1.BootstrapStatus.SUCCEED:
                return (react_1.default.createElement(ink_1.Box, { flexDirection: 'column', marginTop: 1, marginBottom: 1 },
                    react_1.default.createElement(ink_1.Text, null,
                        react_1.default.createElement(ink_1.Color, { green: true }, "\u2713"),
                        react_1.default.createElement(ink_1.Text, null, " "),
                        react_1.default.createElement(ink_1.Text, null, "Dependency graph parsed")),
                    react_1.default.createElement(ink_1.Text, null,
                        react_1.default.createElement(ink_1.Color, { green: true }, "\u2713"),
                        react_1.default.createElement(ink_1.Text, null, " "),
                        react_1.default.createElement(ink_1.Text, null, "Dependencies installed \uD83D\uDCE6"),
                        react_1.default.createElement(ink_1.Text, null, " "),
                        react_1.default.createElement(ink_1.Color, { grey: true }, lerna.version ? 'using lerna ' + lerna.version : ''))));
            default:
                return react_1.default.createElement(ink_1.Text, null,
                    "Unknown status ",
                    lerna.status);
        }
    }
}
exports.LernaStatus = LernaStatus;
//# sourceMappingURL=lerna-status.js.map