"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const promises_1 = require("node:fs/promises");
const node_process_1 = require("node:process");
const promises_2 = require("node:readline/promises");
const palette_1 = require("../../palette");
const createSnapshotTheme_1 = require("./createSnapshotTheme");
(async () => {
    const theme = (0, createSnapshotTheme_1.createSnapshotTheme)({ palette: palette_1.defaultPalette });
    const json = JSON.stringify(theme);
    const relPath = './snapshots/theme.snapshot.json';
    const rl = (0, promises_2.createInterface)({ input: node_process_1.stdin, output: node_process_1.stdout });
    const answer = await rl.question(`Snapshot will be written to ${relPath}.\n y / N: `);
    rl.close();
    if (!answer.toLowerCase().startsWith('y')) {
        // biome-ignore lint/suspicious/noConsole: <>
        console.log('Cancelled');
    }
    (0, promises_1.writeFile)(relPath, json);
})();
