"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function TextComponentAdapter(input) {
    const type = input.accessor.value('GUI_renderType', 'string');
    const { accessor, variable, extraOptions } = input;
    const options = {
        // debounce: 500,   
        pin: true,
        snaps: true,
        min: accessor.value('GUI_min', 'number', 0),
        max: accessor.value('GUI_max', 'number', 100),
        step: accessor.value('GUI_step', 'number', undefined)
    };
    const sliderComponent = {
        editable: extraOptions.editable,
        type: 'VariableRange',
        variable: `${variable.name}`,
        options: options
    };
    if (!options.step) {
        const range = options.max - options.min;
        const MAX_STEP = 50;
        options.step = range > MAX_STEP ? Math.round(range / MAX_STEP) : 1;
    }
    return sliderComponent;
}
exports.default = TextComponentAdapter;
//# sourceMappingURL=SliderAdapter.js.map