"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
/**
 * penguins-eggs
 * components: steps.tsx
 * author: Piero Proietti
 * email: piero.proietti@gmail.com
 * license: MIT
 */
const react_1 = tslib_1.__importDefault(require("react"));
const ink_1 = require("ink");
function Steps({ step = 1 }) {
    let activeWelcome = false;
    let activeLocation = false;
    let activeKeyboard = false;
    let activePartitions = false;
    let activeUsers = false;
    let activeNetwork = false;
    let activeSummary = false;
    let activeInstall = false;
    let activeFinish = false;
    if (step === 1) {
        activeWelcome = true;
    }
    else if (step === 2) {
        activeLocation = true;
    }
    else if (step === 3) {
        activeKeyboard = true;
    }
    else if (step === 4) {
        activePartitions = true;
    }
    else if (step === 5) {
        activeUsers = true;
    }
    else if (step === 6) {
        activeNetwork = true;
    }
    else if (step === 7) {
        activeSummary = true;
    }
    else if (step === 8) {
        activeInstall = true;
    }
    else if (step === 9) {
        activeFinish = true;
    }
    return (react_1.default.createElement(react_1.default.Fragment, null,
        react_1.default.createElement(ink_1.Box, { width: 13, height: 9, flexDirection: "column" },
            react_1.default.createElement(WelcomeTab, { active: activeWelcome }),
            react_1.default.createElement(LocationTab, { active: activeLocation }),
            react_1.default.createElement(KeyboardTab, { active: activeKeyboard }),
            react_1.default.createElement(PartitionTab, { active: activePartitions }),
            react_1.default.createElement(UsersTab, { active: activeUsers }),
            react_1.default.createElement(NetworkTab, { active: activeNetwork }),
            react_1.default.createElement(SummaryTab, { active: activeSummary }),
            react_1.default.createElement(InstallTab, { active: activeInstall }),
            react_1.default.createElement(FinishTab, { active: activeFinish }))));
}
exports.default = Steps;
function WelcomeTab({ active = false }) {
    let backgroundColor = 'white';
    let color = 'black';
    if (active) {
        backgroundColor = 'black';
        color = 'white';
    }
    return react_1.default.createElement(ink_1.Box, null,
        react_1.default.createElement(ink_1.Text, { color: color, backgroundColor: backgroundColor }, " Welcome    "));
}
function LocationTab({ active = false }) {
    let backgroundColor = 'white';
    let color = 'black';
    if (active) {
        backgroundColor = 'black';
        color = 'white';
    }
    return react_1.default.createElement(ink_1.Box, null,
        react_1.default.createElement(ink_1.Text, { color: color, backgroundColor: backgroundColor }, " Location   "));
}
function KeyboardTab({ active = false }) {
    let backgroundColor = 'white';
    let color = 'black';
    if (active) {
        backgroundColor = 'black';
        color = 'white';
    }
    return react_1.default.createElement(ink_1.Box, null,
        react_1.default.createElement(ink_1.Text, { color: color, backgroundColor: backgroundColor }, " Keyboard   "));
}
function PartitionTab({ active = false }) {
    let backgroundColor = 'white';
    let color = 'black';
    if (active) {
        backgroundColor = 'black';
        color = 'white';
    }
    return react_1.default.createElement(ink_1.Box, null,
        react_1.default.createElement(ink_1.Text, { color: color, backgroundColor: backgroundColor }, " Partitions "));
}
function UsersTab({ active = false }) {
    let backgroundColor = 'white';
    let color = 'black';
    if (active) {
        backgroundColor = 'black';
        color = 'white';
    }
    return react_1.default.createElement(ink_1.Box, null,
        react_1.default.createElement(ink_1.Text, { color: color, backgroundColor: backgroundColor }, " Users      "));
}
function NetworkTab({ active = false }) {
    let backgroundColor = 'white';
    let color = 'black';
    if (active) {
        backgroundColor = 'black';
        color = 'white';
    }
    return react_1.default.createElement(ink_1.Box, null,
        react_1.default.createElement(ink_1.Text, { color: color, backgroundColor: backgroundColor }, " Network    "));
}
function SummaryTab({ active = false }) {
    let backgroundColor = 'white';
    let color = 'black';
    if (active) {
        backgroundColor = 'black';
        color = 'white';
    }
    return react_1.default.createElement(ink_1.Box, null,
        react_1.default.createElement(ink_1.Text, { color: color, backgroundColor: backgroundColor }, " Summary    "));
}
function InstallTab({ active = false }) {
    let backgroundColor = 'white';
    let color = 'black';
    if (active) {
        backgroundColor = 'black';
        color = 'white';
    }
    return react_1.default.createElement(ink_1.Box, null,
        react_1.default.createElement(ink_1.Text, { color: color, backgroundColor: backgroundColor }, " Install    "));
}
function FinishTab({ active = false }) {
    let backgroundColor = 'white';
    let color = 'black';
    if (active) {
        backgroundColor = 'black';
        color = 'white';
    }
    return react_1.default.createElement(ink_1.Box, null,
        react_1.default.createElement(ink_1.Text, { color: color, backgroundColor: backgroundColor }, " Finish     "));
}
