/* Socket Lib - Built with esbuild */
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var paths_exports = {};
__export(paths_exports, {
  getSocketAppCacheDir: () => getSocketAppCacheDir,
  getSocketAppCacheTtlDir: () => getSocketAppCacheTtlDir,
  getSocketAppDir: () => getSocketAppDir,
  getSocketCacacheDir: () => getSocketCacacheDir,
  getSocketCliDir: () => getSocketCliDir,
  getSocketDlxDir: () => getSocketDlxDir,
  getSocketHomePath: () => getSocketHomePath,
  getSocketRegistryDir: () => getSocketRegistryDir,
  getSocketRegistryGithubCacheDir: () => getSocketRegistryGithubCacheDir,
  getSocketUserDir: () => getSocketUserDir
});
module.exports = __toCommonJS(paths_exports);
var os = __toESM(require("node:os"));
var path = __toESM(require("node:path"));
var import_socket_cacache_dir = require("#env/socket-cacache-dir");
var import_path = require("./path");
function getSocketHomePath() {
  return getSocketUserDir();
}
function getSocketUserDir() {
  return (0, import_path.normalizePath)(
    path.join(
      os.homedir(),
      /*@__INLINE__*/
      require("./constants/paths").DOT_SOCKET_DIR
    )
  );
}
function getSocketAppDir(appName) {
  return (0, import_path.normalizePath)(
    path.join(
      getSocketUserDir(),
      `${/*@__INLINE__*/
      require("./constants/socket").SOCKET_APP_PREFIX}${appName}`
    )
  );
}
function getSocketCacacheDir() {
  if (import_socket_cacache_dir.SOCKET_CACACHE_DIR) {
    return (0, import_path.normalizePath)(import_socket_cacache_dir.SOCKET_CACACHE_DIR);
  }
  return (0, import_path.normalizePath)(
    path.join(
      getSocketUserDir(),
      `${/*@__INLINE__*/
      require("./constants/socket").SOCKET_APP_PREFIX}cacache`
    )
  );
}
function getSocketDlxDir() {
  return (0, import_path.normalizePath)(
    path.join(
      getSocketUserDir(),
      `${/*@__INLINE__*/
      require("./constants/socket").SOCKET_APP_PREFIX}${/*@__INLINE__*/
      require("./constants/socket").SOCKET_DLX_APP_NAME}`
    )
  );
}
function getSocketAppCacheDir(appName) {
  return (0, import_path.normalizePath)(
    path.join(
      getSocketAppDir(appName),
      /*@__INLINE__*/
      require("./constants/paths").CACHE_DIR
    )
  );
}
function getSocketAppCacheTtlDir(appName) {
  return (0, import_path.normalizePath)(
    path.join(
      getSocketAppCacheDir(appName),
      /*@__INLINE__*/
      require("./constants/paths").CACHE_TTL_DIR
    )
  );
}
function getSocketCliDir() {
  return getSocketAppDir(
    /*@__INLINE__*/
    require("./constants/socket").SOCKET_CLI_APP_NAME
  );
}
function getSocketRegistryDir() {
  return getSocketAppDir(
    /*@__INLINE__*/
    require("./constants/socket").SOCKET_REGISTRY_APP_NAME
  );
}
function getSocketRegistryGithubCacheDir() {
  return (0, import_path.normalizePath)(
    path.join(
      getSocketAppCacheTtlDir(
        /*@__INLINE__*/
        require("./constants/socket").SOCKET_REGISTRY_APP_NAME
      ),
      /*@__INLINE__*/
      require("./constants/github").CACHE_GITHUB_DIR
    )
  );
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  getSocketAppCacheDir,
  getSocketAppCacheTtlDir,
  getSocketAppDir,
  getSocketCacacheDir,
  getSocketCliDir,
  getSocketDlxDir,
  getSocketHomePath,
  getSocketRegistryDir,
  getSocketRegistryGithubCacheDir,
  getSocketUserDir
});
//# sourceMappingURL=paths.js.map
