"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const assisted_service_1 = require("../../common/api/assisted-service");
const PREFIX_LENGHT = 6;
const UISettingService = {
    fetch(clusterId) {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            const { data } = yield assisted_service_1.UISettingsAPI.get(clusterId);
            return (data.length ? JSON.parse(data.slice(PREFIX_LENGHT)) : {});
        });
    },
    update(clusterId, data) {
        return assisted_service_1.UISettingsAPI.put(clusterId, `AI_UI:${JSON.stringify(data)}`);
    },
};
exports.default = UISettingService;
//# sourceMappingURL=UISettingsService.js.map