"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getConfig = void 0;
const chalk = require("chalk");
const fs_1 = __importDefault(require("fs"));
const path_1 = __importDefault(require("path"));
const getConfig = (cwd) => {
    const configFilePath = path_1.default.join(cwd, "aura-ui.config.json");
    if (!fs_1.default.existsSync(configFilePath)) {
        console.log(chalk.red("Aura UI config file not found"));
        console.log("Aura UI is not initialized in this project");
        console.log(chalk.yellow("Run `aura-ui init` to initialize Aura UI in your project"));
        process.exit(1);
    }
    const config = fs_1.default.readFileSync(configFilePath, "utf8");
    return JSON.parse(config);
};
exports.getConfig = getConfig;
