/**
 * @license
 * Copyright 2023 Tyler Technologies, Inc. 
 * License: Apache-2.0
 */
import { FormFieldComponentDelegate } from '../core';
import { SLIDER_CONSTANTS } from './slider-constants';
export class SliderComponentDelegate extends FormFieldComponentDelegate {
    constructor(config) {
        super(config);
    }
    get value() {
        return this._element.value;
    }
    set value(value) {
        this._element.value = value;
    }
    get valueStart() {
        return this._element.valueStart;
    }
    set valueStart(value) {
        this._element.valueStart = value;
    }
    get disabled() {
        return this._element.disabled;
    }
    set disabled(value) {
        this._element.disabled = value;
    }
    onChange(listener) {
        this._element.addEventListener('forge-slider-change', ({ detail }) => listener(detail));
    }
    onFocus(listener) {
        this._element.addEventListener('focus', evt => listener(evt));
    }
    onBlur(listener) {
        this._element.addEventListener('blur', evt => listener(evt));
    }
    _build() {
        return document.createElement(SLIDER_CONSTANTS.elementName);
    }
}
