import { homedir } from "node:os";
import path from "node:path";
import { ZUPLO_CLI_XDG_FOLDER_NAME } from "../constants.js";
function defineDirectoryWithFallback(xdgName, fallback) {
    if (process.env[xdgName]) {
        return process.env[xdgName];
    }
    else {
        return path.join(homedir(), fallback);
    }
}
export const XDG_CONFIG_HOME = defineDirectoryWithFallback("XDG_CONFIG_HOME", ".config");
export const XDG_DATA_HOME = defineDirectoryWithFallback("XDG_DATA_HOME", ".local/share");
export const XDG_STATE_HOME = defineDirectoryWithFallback("XDG_DATA_HOME", ".local/state");
export const ZUPLO_XDG_CONFIG_HOME = path.join(XDG_CONFIG_HOME, ZUPLO_CLI_XDG_FOLDER_NAME);
export const ZUPLO_XDG_DATA_HOME = path.join(XDG_DATA_HOME, ZUPLO_CLI_XDG_FOLDER_NAME);
export const ZUPLO_XDG_STATE_HOME = path.join(XDG_STATE_HOME, ZUPLO_CLI_XDG_FOLDER_NAME);
//# sourceMappingURL=lib.js.map