"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getClaudeSettingsPath = exports.getClaudeUserConfigPath = exports.getClaudeConfigDir = exports.getDefaultClaudeConfigDir = void 0;
const path = __importStar(require("path"));
const config_manager_1 = require("./config-manager");
/**
 * Resolve the canonical default Claude config directory.
 * Ignores CLAUDE_CONFIG_DIR so CCS can keep a stable source of truth
 * for shared plugin/channel state while still honoring test/dev home overrides.
 */
function getDefaultClaudeConfigDir() {
    return path.join((0, config_manager_1.getCcsHome)(), '.claude');
}
exports.getDefaultClaudeConfigDir = getDefaultClaudeConfigDir;
/**
 * Resolve Claude config directory with test/dev overrides.
 * Precedence:
 * 1. CLAUDE_CONFIG_DIR (explicit override)
 * 2. CCS_HOME compatibility path (<CCS_HOME>/.claude)
 * 3. ~/.claude (default)
 */
function getClaudeConfigDir() {
    if (process.env.CLAUDE_CONFIG_DIR) {
        return path.resolve(process.env.CLAUDE_CONFIG_DIR);
    }
    return getDefaultClaudeConfigDir();
}
exports.getClaudeConfigDir = getClaudeConfigDir;
/** Resolve user-scope Claude JSON config path (~/.claude.json). */
function getClaudeUserConfigPath() {
    return path.join((0, config_manager_1.getCcsHome)(), '.claude.json');
}
exports.getClaudeUserConfigPath = getClaudeUserConfigPath;
/** Resolve Claude settings.json path. */
function getClaudeSettingsPath() {
    return path.join(getClaudeConfigDir(), 'settings.json');
}
exports.getClaudeSettingsPath = getClaudeSettingsPath;
//# sourceMappingURL=claude-config-path.js.map