import { _t } from '../i18n/i18n';
export class TableColumnVisibilityButton {
    constructor() {
        this.label = _t('webmapgl.table-column-visibility.label');
    }
    async openModal(ev) {
        const options = {
            component: document.createElement('gl-table-column-visibility'),
            componentOptions: {
                tableId: this.tableId
            },
            event: ev
        };
        const modal = await this.modalCtrl.create(options);
        await modal.present();
        return modal;
    }
    render() {
        return (h("ion-button", { onClick: (e) => this.openModal(e) }, this.label));
    }
    static get is() { return "gl-table-column-visibility-button"; }
    static get properties() { return {
        "label": {
            "type": String,
            "attr": "label"
        },
        "modalCtrl": {
            "connect": "ion-modal-controller"
        },
        "tableId": {
            "type": String,
            "attr": "table-id"
        }
    }; }
}
