import { p as proxyCustomElement, H, c as createEvent, h } from './index.js';
import { d as defineCustomElement$4 } from './p-BQj9WQQe.js';
import { d as defineCustomElement$3 } from './p-DhNY6ZGA.js';
import { d as defineCustomElement$2 } from './p-BGgzlGhs.js';

const listEntryCss = ".list-entry{display:flex;align-items:center;margin-top:8px;align-self:stretch}";

const ListEntry = /*@__PURE__*/ proxyCustomElement(class ListEntry extends H {
    constructor() {
        super();
        this.__registerHost();
        this.__attachShadow();
        this.ifxListEntryChange = createEvent(this, "ifxListEntryChange", 7);
    }
    valueChanged(newValue) {
        if (newValue) {
            this.host.setAttribute('value', 'true');
        }
        else {
            this.host.removeAttribute('value');
        }
    }
    handleFilterEntryChange(event) {
        this.value = event.detail;
        this.ifxListEntryChange.emit({ label: this.label, value: this.value, type: this.type });
    }
    render() {
        return (h("div", { key: 'd3dbfc553becb845810782a586a341e874b36474', class: "wrapper" }, this.type === 'checkbox' ? (h("div", { class: "list-entry" }, h("ifx-checkbox", { size: "s", checked: this.value }, this.label))) : (h("div", { class: "list-entry" }, h("ifx-radio-button", { size: "s", checked: this.value }, this.label)))));
    }
    get host() { return this; }
    static get watchers() { return {
        "value": ["valueChanged"]
    }; }
    static get style() { return listEntryCss; }
}, [257, "ifx-list-entry", {
        "value": [1028],
        "label": [1],
        "type": [1]
    }, [[0, "ifxChange", "handleFilterEntryChange"]], {
        "value": ["valueChanged"]
    }]);
function defineCustomElement$1() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["ifx-list-entry", "ifx-checkbox", "ifx-icon", "ifx-radio-button"];
    components.forEach(tagName => { switch (tagName) {
        case "ifx-list-entry":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, ListEntry);
            }
            break;
        case "ifx-checkbox":
            if (!customElements.get(tagName)) {
                defineCustomElement$4();
            }
            break;
        case "ifx-icon":
            if (!customElements.get(tagName)) {
                defineCustomElement$3();
            }
            break;
        case "ifx-radio-button":
            if (!customElements.get(tagName)) {
                defineCustomElement$2();
            }
            break;
    } });
}

const IfxListEntry = ListEntry;
const defineCustomElement = defineCustomElement$1;

export { IfxListEntry, defineCustomElement };
//# sourceMappingURL=ifx-list-entry.js.map

//# sourceMappingURL=ifx-list-entry.js.map