import { r as registerInstance, h, H as Host, g as getElement } from './core-095fd691.js';
var BceElementSlider = /** @class */ (function () {
    function class_1(hostRef) {
        var _this = this;
        registerInstance(this, hostRef);
        this.handleInput = function (event) {
            event.cancelBubble = true;
            var target = event.target;
            _this.value = target.value;
            _this.el.dispatchEvent(new Event('input', { bubbles: true }));
        };
    }
    class_1.prototype.componentDidLoad = function () {
        this.value = (this.template && this.template.max / 2) || 0;
    };
    class_1.prototype.render = function () {
        if (!this.template)
            return null;
        return (h(Host, null, h("p", null, this.template.question), h("div", { class: "top" }, h("span", null, h("label", null, this.template.minText), h("label", null, this.template.min)), h("label", null, this.value), h("span", null, h("label", null, this.template.maxText), h("label", null, this.template.max))), h("bce-slider", { onInput: this.handleInput, step: this.template.step, "initial-value": this.value, min: this.template.min, max: this.template.max })));
    };
    Object.defineProperty(class_1.prototype, "el", {
        get: function () { return getElement(this); },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(class_1, "style", {
        get: function () { return "bce-element-slider p{font-weight:500;text-align:center}\@media screen and (min-width:1024px){bce-element-slider p{text-align:left}}bce-element-slider>div.top{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}bce-element-slider>div.top>span{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}bce-element-slider>div.top>span:first-child label{margin:5px auto 5px 5px}bce-element-slider>div.top>span:nth-child(2) label{margin:5px 5px 5px auto}"; },
        enumerable: true,
        configurable: true
    });
    return class_1;
}());
export { BceElementSlider as bce_element_slider };
