'use strict';

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

const core = require('./core-b7b9d752.js');
require('./utils-2a7c8f6e.js');
const i18n_provider = require('./i18n.provider-5632e5ed.js');
const column_renderer = require('./column.renderer-62044f6a.js');

const ColumnPinner = class {
    constructor(hostRef) {
        core.registerInstance(this, hostRef);
        /**
         * Is pinning enabled
         */
        this.enabled = true;
        /**
         * Type of pinning not allows
         * Possible values are: `"left"`, `"right"`,  and `null` (both left and right pinning allowed). Defaults to null.
         */
        this.disallow = null;
    }
    render() {
        if (!this.enabled) {
            return undefined;
        }
        return column_renderer.COLUMN_CONTEXT_MENU.filter((o) => !this.disallow || o.value !== this.disallow)
            .map(o => core.h("anj-context-menu-item", { action: o.value }, this.translator(o.label)));
    }
    get element() { return core.getElement(this); }
    static get style() { return "anj-column-pinner {\n  display: none;\n}"; }
};
i18n_provider.Tunnel.injectProps(ColumnPinner, ['translator']);

exports.anj_column_pinner = ColumnPinner;
