import { resolvePlatform } from "../adapters/factory.js";
export function getServerMode(server) {
    return server.mode || "coolify";
}
/** Returns display label for CLI output: "coolify", "dokploy", or "bare" */
export function getServerModeLabel(server) {
    if (isBareServer(server))
        return "bare";
    const platform = resolvePlatform(server);
    return platform ?? "coolify";
}
export function isBareServer(server) {
    return resolvePlatform(server) === undefined;
}
export function requireManagedMode(server, commandName) {
    const platform = resolvePlatform(server);
    if (!platform) {
        return `The "${commandName}" command is not available for bare servers. This command requires a managed platform (Coolify or Dokploy).`;
    }
    return null;
}
//# sourceMappingURL=modeGuard.js.map