"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const field_1 = require("../../../../../client/field");
const processNumberValue_1 = require("../../../../../client/processNumberValue");
class Slider extends field_1.Field {
    constructor($props, $system) {
        super($props, $system, $system.api.document.createElement('input'), {
            valueKey: 'value',
            defaultValue: '0',
            defaultStyle: $system.style['slider'],
            defaultAttr: {
                type: 'range',
            },
            processValue: processNumberValue_1.processNumberValue,
            propHandlers: {
                min: (min = 0) => {
                    this.$element.min = `${min}`;
                },
                max: (max = 100) => {
                    this.$element.max = `${max}`;
                },
            },
        });
        const { min = 0, max = 100 } = $props;
        this.$element.min = `${min}`;
        this.$element.max = `${max}`;
    }
}
exports.default = Slider;
//# sourceMappingURL=Component.js.map