"use strict";

Object.defineProperty(exports, "__esModule", {
    value: !0
}), exports.addCustomSelectRanges = exports.deletaCustomSelectRanges = void 0;

const update_select_border_1 = require("../../scenegraph/select/update-select-border"), update_custom_select_border_1 = require("../../scenegraph/select/update-custom-select-border");

function deletaCustomSelectRanges(state) {
    const {customSelectedRangeComponents: customSelectedRangeComponents} = state.table.scenegraph;
    customSelectedRangeComponents.forEach(((selectComp, key) => {
        selectComp.rect.delete();
    })), customSelectedRangeComponents.clear(), state.select.customSelectRanges = [];
}

function addCustomSelectRanges(customSelectRanges, state) {
    customSelectRanges.forEach((customRange => {
        (0, update_custom_select_border_1.updateCustomSelectBorder)(state.table.scenegraph, customRange.range, customRange.style);
    })), state.select.customSelectRanges = customSelectRanges, (0, update_select_border_1.updateAllSelectComponent)(state.table.scenegraph), 
    state.table.scenegraph.updateNextFrame();
}

exports.deletaCustomSelectRanges = deletaCustomSelectRanges, exports.addCustomSelectRanges = addCustomSelectRanges;
//# sourceMappingURL=custom-select.js.map
