import { h } from '@stencil/core';
export class TableColumnVisibilityToggle {
    constructor() {
        this.enabled = true;
    }
    changeHandler(e) {
        this.enabled = e.detail.checked;
        this.column.visible = this.enabled;
    }
    render() {
        return (h("ion-item", null,
            h("ion-label", null, this.column.label),
            h("ion-toggle", { value: "toggle", checked: this.enabled, onIonChange: (e) => this.changeHandler(e) })));
    }
    static get is() { return "gl-table-column-visibility-toggle"; }
    static get properties() { return {
        "column": {
            "type": "any",
            "mutable": false,
            "complexType": {
                "original": "HTMLGlTableColumnElement",
                "resolved": "any",
                "references": {
                    "HTMLGlTableColumnElement": {
                        "location": "global"
                    }
                }
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "column",
            "reflect": false
        },
        "enabled": {
            "type": "boolean",
            "mutable": true,
            "complexType": {
                "original": "boolean",
                "resolved": "boolean",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "enabled",
            "reflect": false,
            "defaultValue": "true"
        }
    }; }
}
