"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }

var _chunkMUKNCWDCcjs = require('./chunk-MUKNCWDC.cjs');



var _chunk56YHC4NMcjs = require('./chunk-56YHC4NM.cjs');



var _chunkDFJNOFN2cjs = require('./chunk-DFJNOFN2.cjs');

// src/utilities/get-default-config.ts
_chunkDFJNOFN2cjs.init_cjs_shims.call(void 0, );
var _fs = require('fs');
var _path = require('path');
var DEFAULT_COLOR_CONFIG = {
  "light": {
    "background": "#fafafa",
    "foreground": "#1d1e22",
    "brand": "#1fb2a6",
    "alternate": "#db2777",
    "help": "#5C4EE5",
    "success": "#087f5b",
    "info": "#0550ae",
    "warning": "#e3b341",
    "danger": "#D8314A",
    "positive": "#22c55e",
    "negative": "#dc2626"
  },
  "dark": {
    "background": "#1d1e22",
    "foreground": "#cbd5e1",
    "brand": "#2dd4bf",
    "alternate": "#db2777",
    "help": "#818cf8",
    "success": "#10b981",
    "info": "#58a6ff",
    "warning": "#f3d371",
    "danger": "#D8314A",
    "positive": "#22c55e",
    "negative": "#dc2626"
  }
};
var getDefaultConfig = /* @__PURE__ */ _chunkDFJNOFN2cjs.__name.call(void 0, (root) => {
  let license = _chunk56YHC4NMcjs.STORM_DEFAULT_LICENSE;
  let homepage = _chunk56YHC4NMcjs.STORM_DEFAULT_HOMEPAGE;
  let name;
  let namespace;
  let repository;
  const workspaceRoot = _chunkMUKNCWDCcjs.findWorkspaceRoot.call(void 0, root);
  if (_fs.existsSync.call(void 0, _path.join.call(void 0, workspaceRoot, "package.json"))) {
    const file = _fs.readFileSync.call(void 0, _path.join.call(void 0, workspaceRoot, "package.json"), {
      encoding: "utf8"
    });
    if (file) {
      const packageJson = JSON.parse(file);
      if (packageJson.name) {
        name = packageJson.name;
      }
      if (packageJson.namespace) {
        namespace = packageJson.namespace;
      }
      if (_optionalChain([packageJson, 'access', _ => _.repository, 'optionalAccess', _2 => _2.url])) {
        repository = _optionalChain([packageJson, 'access', _3 => _3.repository, 'optionalAccess', _4 => _4.url]);
      }
      if (packageJson.license) {
        license = packageJson.license;
      }
      if (packageJson.homepage) {
        homepage = packageJson.homepage;
      }
    }
  }
  return {
    workspaceRoot,
    name,
    namespace,
    repository,
    license,
    homepage,
    docs: `${homepage || _chunk56YHC4NMcjs.STORM_DEFAULT_HOMEPAGE}/docs`,
    licensing: `${homepage || _chunk56YHC4NMcjs.STORM_DEFAULT_HOMEPAGE}/license`
  };
}, "getDefaultConfig");




exports.DEFAULT_COLOR_CONFIG = DEFAULT_COLOR_CONFIG; exports.getDefaultConfig = getDefaultConfig;
