'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const core = require('./core-b7b9d752.js');
const i18n_provider = require('./i18n.provider-5632e5ed.js');

const BooleanFilterPanel = class {
    constructor(hostRef) {
        core.registerInstance(this, hostRef);
        this.anjFilterChange = core.createEvent(this, "anjFilterChange", 7);
    }
    async reset() {
        this.element.querySelector('form').reset();
    }
    onSubmit(e) {
        e.preventDefault();
        const check = e.target.querySelector('input');
        this.anjFilterChange.emit({ field: this.field, type: 'equals', query: check.checked });
    }
    render() {
        return (core.h("form", { onSubmit: (e) => this.onSubmit(e) }, core.h("anj-checkbox-group", null, core.h("anj-checkbox", { name: "query" }, this.translator('Show only true'))), core.h("anj-button-group", { align: "right" }, core.h("anj-button", { context: "text", type: "submit" }, this.translator('Apply')))));
    }
    get element() { return core.getElement(this); }
    static get style() { return ".sc-anj-boolean-filter-panel-h {\n  display: block;\n  padding: 1rem;\n}\n.sc-anj-boolean-filter-panel-h anj-button-group.sc-anj-boolean-filter-panel {\n  margin-bottom: 0;\n}"; }
};
i18n_provider.Tunnel.injectProps(BooleanFilterPanel, ['translator']);

exports.anj_boolean_filter_panel = BooleanFilterPanel;
