"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Field_1 = require("../../../../../Class/Field");
const _ids_1 = require("../../../../_ids");
class Slider extends Field_1.Field {
    constructor(system) {
        super({
            i: ['value', 'style', 'min', 'max', 'attr'],
            o: ['value'],
        }, {}, system, _ids_1.ID_SLIDER);
        this._defaultState = {
            value: 0,
            min: 0,
            max: 100,
        };
    }
    initialValue() {
        var _a, _b;
        const { value = 0, min = 0, max = 100 } = this._i;
        // @ts-ignore
        return ((_b = (_a = this._input) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.peak()) ? value : min;
    }
}
exports.default = Slider;
//# sourceMappingURL=index.js.map