"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.handleExportState = void 0;
const tslib_1 = require("tslib");
const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
const handleExportState = (type, name, state) => {
    switch (type) {
        case 'Clipboard':
            let stringifiedState = JSON.stringify(state);
            Helper_1.default.copyToClipboard(stringifiedState);
            break;
        case 'Console':
            console.log('Adaptable State: ', state);
            break;
        case 'JSON':
            const jsonFileName = name + '.json';
            const jsonContent = JSON.stringify(state);
            Helper_1.default.createDownloadedFile(jsonContent, jsonFileName, 'application/json');
            break;
    }
};
exports.handleExportState = handleExportState;
