"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SERVICE_COMMAND_USAGE = exports.SERVICE_PROCESS_STATUSES = exports.SERVICE_EVENT_TYPES = exports.SERVICE_REPO_RESULTS = exports.SERVICE_REPO_STATES = exports.SERVICE_PUBLIC_COMMAND_ACTIONS = exports.SERVICE_COMMAND_ACTIONS = void 0;
exports.isServiceCommandAction = isServiceCommandAction;
exports.isPublicServiceCommandAction = isPublicServiceCommandAction;
const branding_1 = require("../../core/branding");
exports.SERVICE_COMMAND_ACTIONS = {
    enable: "enable",
    disable: "disable",
    restart: "restart",
    status: "status",
    logShow: "log-show",
    run: "__run",
};
exports.SERVICE_PUBLIC_COMMAND_ACTIONS = {
    enable: exports.SERVICE_COMMAND_ACTIONS.enable,
    disable: exports.SERVICE_COMMAND_ACTIONS.disable,
    restart: exports.SERVICE_COMMAND_ACTIONS.restart,
    status: exports.SERVICE_COMMAND_ACTIONS.status,
    logShow: exports.SERVICE_COMMAND_ACTIONS.logShow,
};
exports.SERVICE_REPO_STATES = {
    healthy: "healthy",
    broken: "broken",
    disabled: "disabled",
};
exports.SERVICE_REPO_RESULTS = {
    success: "success",
    noOp: "no-op",
    failed: "failed",
};
exports.SERVICE_EVENT_TYPES = {
    serviceStarted: "service_started",
    serviceStopping: "service_stopping",
    serviceDrainStarted: "service_drain_started",
    serviceDrainCompleted: "service_drain_completed",
    serviceDrainCancelled: "service_drain_cancelled",
    serviceUpdateDetected: "service_update_detected",
    registryError: "registry_error",
    repoResult: "repo_result",
};
exports.SERVICE_PROCESS_STATUSES = {
    running: "running",
    stopped: "stopped",
};
const SERVICE_COMMAND_ACTION_SET = new Set(Object.values(exports.SERVICE_COMMAND_ACTIONS));
const SERVICE_PUBLIC_COMMAND_ACTION_SET = new Set(Object.values(exports.SERVICE_PUBLIC_COMMAND_ACTIONS));
exports.SERVICE_COMMAND_USAGE = `${branding_1.CLI_COMMAND_NAME} service <enable|disable [--force]|restart [--force]|status|log ...>`;
function isServiceCommandAction(value) {
    return SERVICE_COMMAND_ACTION_SET.has(value);
}
function isPublicServiceCommandAction(value) {
    return SERVICE_PUBLIC_COMMAND_ACTION_SET.has(value);
}
