// #region Imports
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var TableHeaderCellElement_1;
import { HTMLElementEventEmitter } from '@breadstone/mosaik-elements';
import { DomServiceLocator } from '../../../../Dom/Dom';
import { Emit } from '../../../../events/Decorators/EmitDecorator';
import { Themeable } from '../../../Behaviors/Themeable';
import { addInheritanceConsumerController } from '../../../Controllers/InheritanceConsumerController';
import { Attribute } from '../../../Decorators/AttributeDecorator';
import { Component } from '../../../Decorators/ComponentDecorator';
import { IconElement } from '../../Media/Icon/IconElement';
import { DividerElement } from '../../Primitives/Divider/DividerElement';
import { TextElement } from '../../Primitives/Text/TextElement';
import { TableCellBaseElement } from './Abstracts2/TableCellBaseElement';
import { TableElementIntl } from './intl/TableElementIntl';
import { TableElement } from './TableElement';
import { tableHeaderCellElementTemplate } from './TableHeaderCellElementTemplate';
import { TABLE_INHERITANCE_CONTEXT } from './TableInheritanceContext';
import { tableHeaderCellElementCosmopolitanStyle } from './Themes/TableHeaderCellElement.Cosmopolitan';
import { tableHeaderCellElementJoyStyle } from './Themes/TableHeaderCellElement.Joy';
import { tableHeaderCellElementMemphisStyle } from './Themes/TableHeaderCellElement.Memphis';
// #endregion
/**
 * Table Header Cell - A single header cell with optional sorting capabilities.
 *
 * @element mosaik-table-header-cell
 *
 * @slot - The default slot.
 *
 * @csspart actions - The actions part.
 * @csspart content - The content part.
 * @csspart icon - The sort direction icon part.
 * @csspart menu - The menu part.
 * @csspart resize-handle - The resize-handle part.
 * @csspart root - The root part.
 * @csspart separator - The separator part.
 * @csspart sort-index - The sort priority index badge part (visible in multi-sort mode).
 * @csspart text - The text part.
 *
 * @cssprop {String} --table-header-cell-background-color - The cell background color CSS custom property.
 * @cssprop {String} --table-header-cell-border-color - The cell border color CSS custom property.
 * @cssprop {String} --table-header-cell-border-radius - The cell border radius CSS custom property.
 * @cssprop {String} --table-header-cell-border-width - The cell border width CSS custom property.
 * @cssprop {String} --table-header-cell-font-family - The cell font family CSS custom property.
 * @cssprop {String} --table-header-cell-font-letter-spacing - The cell font letter spacing CSS custom property.
 * @cssprop {String} --table-header-cell-font-line-height - The cell font line height CSS custom property.
 * @cssprop {String} --table-header-cell-font-size - The cell font size CSS custom property.
 * @cssprop {String} --table-header-cell-font-text-decoration - The cell font text decoration CSS custom property.
 * @cssprop {String} --table-header-cell-font-text-transform - The cell font text transform CSS custom property.
 * @cssprop {String} --table-header-cell-font-weight - The cell font weight CSS custom property.
 * @cssprop {String} --table-header-cell-foreground-color - The cell foreground color CSS custom property.
 * @cssprop {String} --table-header-cell-gap - The cell gap CSS custom property.
 * @cssprop {String} --table-header-cell-padding-bottom - The cell padding bottom CSS custom property.
 * @cssprop {String} --table-header-cell-padding-left - The cell padding left CSS custom property.
 * @cssprop {String} --table-header-cell-padding-right - The cell padding right CSS custom property.
 * @cssprop {String} --table-header-cell-padding-top - The cell padding top CSS custom property.
 * @cssprop {String} --table-header-cell-resize-handle-color - The resize handle color CSS custom property.
 * @cssprop {String} --table-header-cell-resize-handle-width - The resize handle width CSS custom property.
 * @cssprop {String} --table-header-cell-separator-color - The column separator color CSS custom property.
 * @cssprop {String} --table-header-cell-separator-width - The column separator width CSS custom property.
 * @cssprop {String} --table-header-cell-shadow - The cell shadow CSS custom property.
 * @cssprop {String} --table-header-cell-shadow-blur - The cell shadow blur CSS custom property.
 * @cssprop {String} --table-header-cell-shadow-color - The cell shadow color CSS custom property.
 * @cssprop {String} --table-header-cell-shadow-offset-x - The cell shadow offset x CSS custom property.
 * @cssprop {String} --table-header-cell-shadow-offset-y - The cell shadow offset y CSS custom property.
 * @cssprop {String} --table-header-cell-shadow-spread - The cell shadow spread CSS custom property.
 * @cssprop {String} --table-header-cell-transition-duration - The cell transition duration CSS custom property.
 * @cssprop {String} --table-header-cell-transition-mode - The cell transition mode CSS custom property.
 * @cssprop {String} --table-header-cell-transition-property - The cell transition property CSS custom property.
 * @cssprop {String} --table-header-cell-translate - The cell translate CSS custom property.
 *
 * @fires tableSortChanged {TableSortChangedEvent} - Fired when the sort direction of the cell has changed.
 * @fires tableColumnResized {TableColumnResizedEvent} - Fired when the column has been resized.
 * @fires tableRequestChooseColumns {TableChooseColumnsEvent} - Fired when the choose columns action is requested from a header cell menu.
 *
 * @dependency mosaik-divider - The Divider element.
 * @dependency mosaik-dropdown-button - The Dropdown Button element.
 * @dependency mosaik-icon - The Icon element.
 * @dependency mosaik-menu - The Menu element.
 * @dependency mosaik-menu-item - The Menu Item element.
 * @dependency mosaik-text - The Text element.
 *
 * @example
 * Sortable header cell:
 * ```html
 * <mosaik-table-header-cell text="Name" key="name" sortable></mosaik-table-header-cell>
 * ```
 *
 * @public
 */
let TableHeaderCellElement = TableHeaderCellElement_1 = class TableHeaderCellElement extends Themeable(TableCellBaseElement) {
    // #region Fields
    _inheritance = addInheritanceConsumerController(this, {
        context: TABLE_INHERITANCE_CONTEXT
    });
    _tableSortChanged;
    _tableColumnResized;
    _intl;
    _key;
    _sorted;
    _sortable;
    _sortDirection;
    _resizable;
    _minWidth;
    _maxWidth;
    _pinned;
    _pinable;
    _resizeStartX;
    _resizeStartWidth;
    _isResizing;
    _hideable;
    _autoSizeable;
    _columnChoosable;
    _sortIndex;
    // #endregion
    // #region Ctor
    /**
     * @public
     */
    constructor() {
        super();
        this._intl = new TableElementIntl();
        this._key = '';
        this._sorted = false;
        this._sortable = false;
        this._pinable = false;
        this._sortDirection = 'none';
        this._resizable = false;
        this._minWidth = '50px';
        this._maxWidth = '';
        this._pinned = 'none';
        this._resizeStartX = 0;
        this._resizeStartWidth = 0;
        this._isResizing = false;
        this._hideable = false;
        this._autoSizeable = false;
        this._columnChoosable = false;
        this._sortIndex = undefined;
        this._tableSortChanged = new HTMLElementEventEmitter(this, 'tableSortChanged');
        this._tableColumnResized = new HTMLElementEventEmitter(this, 'tableColumnResized');
    }
    // #endregion
    // #region Properties
    /**
     * Returns the `is` property.
     *
     * @public
     * @static
     * @readonly
     */
    static get is() {
        return 'mosaik-table-header-cell';
    }
    /**
     * Returns the inherited `intl` labels for the table header cell.
     * Falls back to a local default instance when not inside a `TableElement`.
     *
     * @public
     * @readonly
     */
    get intl() {
        return this._inheritance.get('intl', this._intl) ?? this._intl;
    }
    set intl(value) {
        this._inheritance.markExplicit('intl');
        this._intl = value;
        this.requestUpdate('intl');
    }
    /**
     * Gets or sets the `key` property that identifies the column associated with this header cell.
     *
     * @public
     * @attr
     */
    get key() {
        return this._key;
    }
    set key(value) {
        if (this._key !== value) {
            this._key = value;
            this.requestUpdate('key');
        }
    }
    /**
     * Gets or sets the `sortable` property that indicates whether this header cell supports sorting.
     *
     * @public
     * @attr
     */
    get sortable() {
        return this._sortable;
    }
    set sortable(value) {
        if (this._sortable !== value) {
            this._sortable = value;
            this.requestUpdate('sortable');
        }
    }
    /**
     * Gets or sets the `pinable` property that indicates whether this column can be pinned.
     *
     * @public
     * @attr
     */
    get pinable() {
        return this._pinable;
    }
    set pinable(value) {
        if (this._pinable !== value) {
            this._pinable = value;
            this.requestUpdate('pinable');
        }
    }
    /**
     * Gets or sets the `sortDirection` property that indicates the current sort direction of this header cell.
     *
     * @public
     * @attr
     */
    get sortDirection() {
        return this._sortDirection;
    }
    set sortDirection(value) {
        if (this._sortDirection !== value) {
            this._sortDirection = value;
            this.requestUpdate('sortDirection');
        }
    }
    /**
     * Returns whether the cell is currently sorted (i.e., has a sort direction other than 'none').
     *
     * @public
     * @readonly
     * @attr
     */
    get sorted() {
        return this._sorted;
    }
    set sorted(value) {
        if (this._sorted !== value) {
            this._sorted = value;
            this.requestUpdate('sorted');
        }
    }
    /**
     * Gets or sets the 1-based sort priority index for multi-sort mode.
     * `undefined` when the column is not sorted or in single-sort mode.
     *
     * @public
     * @attr
     */
    get sortIndex() {
        return this._sortIndex;
    }
    set sortIndex(value) {
        if (this._sortIndex !== value) {
            this._sortIndex = value;
            this.requestUpdate('sortIndex');
        }
    }
    /**
     * Returns the inherited sort mode from the parent table.
     * Falls back to `'single'` when not inside a `TableElement`.
     *
     * @public
     * @readonly
     */
    get sortMode() {
        return this._inheritance.get('sortMode', 'single') ?? 'single';
    }
    /**
     * Gets or sets the `resizable` property that indicates whether this column can be resized.
     *
     * @public
     * @attr
     */
    get resizable() {
        return this._resizable;
    }
    set resizable(value) {
        if (this._resizable !== value) {
            this._resizable = value;
            this.requestUpdate('resizable');
        }
    }
    /**
     * Gets or sets the `minWidth` property that indicates the minimum width of this column.
     *
     * @public
     * @attr
     */
    get minWidth() {
        return this._minWidth;
    }
    set minWidth(value) {
        if (this._minWidth !== value) {
            this._minWidth = value;
            this.requestUpdate('minWidth');
        }
    }
    /**
     * Gets or sets the `maxWidth` property that indicates the maximum width of this column.
     *
     * @public
     * @attr
     */
    get maxWidth() {
        return this._maxWidth;
    }
    set maxWidth(value) {
        if (this._maxWidth !== value) {
            this._maxWidth = value;
            this.requestUpdate('maxWidth');
        }
    }
    /**
     * Gets or sets the `pinned` property that indicates the pinning position of this column.
     *
     * @public
     * @attr
     */
    get pinned() {
        return this._pinned;
    }
    set pinned(value) {
        if (this._pinned !== value) {
            this._pinned = value;
            this.requestUpdate('pinned');
        }
    }
    /**
     * Gets or sets the `columnHidden` property that indicates whether this column is hidden.
     * Overrides the base setter to back-propagate the change to the parent table.
     *
     * @public
     * @override
     */
    get columnHidden() {
        return super.columnHidden;
    }
    set columnHidden(value) {
        if (super.columnHidden !== value) {
            super.columnHidden = value;
            DomServiceLocator.current.findAncestor(this, TableElement)?.notifyColumnMetadataChanged();
        }
    }
    /**
     * Gets or sets the `hideable` property that indicates whether this column can be hidden.
     * When `true`, the "Hide column" menu item is shown.
     *
     * @public
     * @attr
     */
    get hideable() {
        return this._hideable;
    }
    set hideable(value) {
        if (this._hideable !== value) {
            this._hideable = value;
            this.requestUpdate('hideable');
        }
    }
    /**
     * Gets or sets the `autoSizeable` property that indicates whether this column can be auto-sized.
     * When `true`, the "Auto size column" menu item is shown.
     *
     * @public
     * @attr
     */
    get autoSizeable() {
        return this._autoSizeable;
    }
    set autoSizeable(value) {
        if (this._autoSizeable !== value) {
            this._autoSizeable = value;
            this.requestUpdate('autoSizeable');
        }
    }
    /**
     * Gets or sets the `columnChoosable` property that indicates whether this column can be chosen.
     * When `true`, the "Choose Columns" menu item is shown.
     *
     * @public
     * @attr
     */
    get columnChoosable() {
        return this._columnChoosable;
    }
    set columnChoosable(value) {
        if (this._columnChoosable !== value) {
            this._columnChoosable = value;
            this.requestUpdate('columnChoosable');
        }
    }
    /**
     * Called when the sort direction changes.
     * Provides reference to `ITableSortChangedEventDetail` as event argument.
     *
     * @public
     * @readonly
     * @eventProperty
     * @type IEventEmitter<ITableSortChangedEventDetail>
     */
    get tableSortChanged() {
        return this._tableSortChanged;
    }
    /**
     * Called when the column is resized.
     * Provides reference to `ITableColumnResizedEventDetail` as event argument.
     *
     * @public
     * @readonly
     * @eventProperty
     * @type IEventEmitter<ITableColumnResizedEventDetail>
     */
    get tableColumnResized() {
        return this._tableColumnResized;
    }
    // #endregion
    // #region Methods
    /**
     * Sorts the cell in the specified direction.
     *
     * @public
     */
    sort(direction) {
        if (!direction) {
            direction = this.getNextSortDirection();
        }
        const cells = this.parentElement
            ? DomServiceLocator.current.findDescendants(this.parentElement, TableHeaderCellElement_1)
            : null;
        if (this.sortMode === 'multiple') {
            this.sortMultiple(direction, cells);
        }
        else {
            this.sortSingle(direction, cells);
        }
    }
    /**
     * Unsorts the cell.
     *
     * @public
     */
    unsort() {
        const prevIndex = this._sortIndex;
        this.sortDirection = 'none';
        this.sorted = false;
        this.sortIndex = undefined;
        this.requestUpdate('sortDirection');
        // In multi-sort mode, decrement sort indices of higher-priority siblings
        if (this.sortMode === 'multiple' && prevIndex !== undefined) {
            const cells = this.parentElement
                ? DomServiceLocator.current.findDescendants(this.parentElement, TableHeaderCellElement_1)
                : null;
            cells?.forEach((x) => {
                if (x !== this && x.sortIndex !== undefined && x.sortIndex > prevIndex) {
                    x.sortIndex = x.sortIndex - 1;
                }
            });
        }
        this._tableSortChanged.emit({
            sortKey: this._key,
            sortDirection: this._sortDirection,
            sortIndex: undefined,
            activeSorts: this.getActiveSorts()
        });
    }
    /**
     * @public
     * @override
     */
    disconnectedCallback() {
        super.disconnectedCallback();
        this.cleanupResizeListeners();
    }
    /**
     * Starts the column resize operation.
     *
     * @public
     */
    startResize(event) {
        if (!this._resizable) {
            return;
        }
        event.preventDefault();
        event.stopPropagation();
        this._isResizing = true;
        this._resizeStartX = event.clientX;
        this._resizeStartWidth = this.getBoundingClientRect().width;
        document.addEventListener('pointermove', this.handlePointerMove);
        document.addEventListener('pointerup', this.handlePointerUp);
    }
    /**
     * Sets the pinning position of this column.
     *
     * @public
     */
    pin(position) {
        this.pinned = position;
        const table = DomServiceLocator.current.findAncestor(this, TableElement);
        table?.notifyColumnMetadataChanged();
    }
    /**
     * Auto-sizes this column based on the widest content across header and body cells.
     *
     * @public
     */
    autoSize() {
        // Clear any leftover inline width from a previous drag resize
        this.style.removeProperty('width');
        const table = DomServiceLocator.current.findAncestor(this, TableElement);
        if (!table) {
            return;
        }
        const parent = this.parentElement;
        const columnIndex = parent
            ? Array.from(parent.children).indexOf(this)
            : -1;
        if (columnIndex >= 0) {
            table.autoSizeColumn(columnIndex);
        }
    }
    /**
     * Returns the natural content width of this header cell,
     * by temporarily measuring `[part='root']` at its intrinsic `max-content` width.
     *
     * @public
     */
    getContentWidth() {
        const root = this.renderRoot?.querySelector('[part="root"]');
        if (!root) {
            return this.scrollWidth;
        }
        // Temporarily allow root to size naturally (override CSS width: 100%)
        const savedWidth = root.style.width;
        const savedFlexShrink = root.style.flexShrink;
        root.style.width = 'max-content';
        root.style.flexShrink = '0';
        const naturalWidth = root.offsetWidth;
        // Restore
        root.style.width = savedWidth;
        root.style.flexShrink = savedFlexShrink;
        // Add host padding
        const cs = getComputedStyle(this);
        const padding = parseFloat(cs.paddingLeft) + parseFloat(cs.paddingRight);
        return Math.ceil(naturalWidth + padding);
    }
    /**
     * Requests the table to open the choose columns editor.
     * Dispatches a bubbling `tableRequestChooseColumns` event
     * that the parent `TableElement` will catch.
     *
     * @public
     */
    requestChooseColumns() {
        this.dispatchEvent(new CustomEvent('tableRequestChooseColumns', {
            bubbles: true,
            composed: true
        }));
    }
    /**
     * Handles pointer movement during resize.
     *
     * @private
     */
    handlePointerMove = (event) => {
        if (!this._isResizing) {
            return;
        }
        const delta = event.clientX - this._resizeStartX;
        let newWidth = this._resizeStartWidth + delta;
        const minPx = this.parseSizeValue(this._minWidth);
        const maxPx = this.parseSizeValue(this._maxWidth);
        if (minPx > 0) {
            newWidth = Math.max(newWidth, minPx);
        }
        if (maxPx > 0) {
            newWidth = Math.min(newWidth, maxPx);
        }
        this.style.width = `${newWidth}px`;
        this.dispatchColumnResize(newWidth);
    };
    /**
     * Handles pointer up to end the resize operation.
     *
     * @private
     */
    handlePointerUp = (_event) => {
        this._isResizing = false;
        this.cleanupResizeListeners();
        const finalWidth = this.getBoundingClientRect().width;
        // Clear the inline width so the grid-template-columns controls the cell width
        this.style.removeProperty('width');
        this.dispatchColumnResize(finalWidth);
    };
    /**
     * Dispatches the column resized event.
     *
     * @private
     */
    dispatchColumnResize(width) {
        const parent = this.parentElement;
        const columnIndex = parent
            ? Array.from(parent.children).indexOf(this)
            : -1;
        this._tableColumnResized.emit({
            columnIndex,
            width
        });
    }
    /**
     * Cleans up resize event listeners from document.
     *
     * @private
     */
    cleanupResizeListeners() {
        document.removeEventListener('pointermove', this.handlePointerMove);
        document.removeEventListener('pointerup', this.handlePointerUp);
    }
    /**
     * Parses a CSS size value to pixels.
     *
     * @private
     */
    parseSizeValue(value) {
        if (!value) {
            return 0;
        }
        const num = parseFloat(value);
        return isNaN(num) ? 0 : num;
    }
    /**
     * Gets the next sort direction in the cycle: 'none' -> 'asc' -> 'desc' -> 'none'.
     *
     * @private
     */
    getNextSortDirection() {
        let nextSortDirection = 'none';
        switch (this._sortDirection) {
            case 'asc':
                nextSortDirection = 'desc';
                break;
            case 'desc':
                nextSortDirection = 'none';
                break;
            case 'none':
                nextSortDirection = 'asc';
                break;
            default:
                nextSortDirection = 'none';
                break;
        }
        return nextSortDirection;
    }
    /**
     * Single-sort logic: only one column can be sorted at a time (last one wins).
     *
     * @private
     */
    sortSingle(direction, cells) {
        this.sortDirection = direction;
        this.sorted = this.sortDirection !== 'none';
        this.sortIndex = undefined;
        this.requestUpdate('sortDirection');
        // If becoming unsorted, clear other cells first, then apply own direction
        if (!this.sorted) {
            cells?.forEach((x) => {
                if (x !== this) {
                    x.sortDirection = 'none';
                    x.sorted = false;
                    x.sortIndex = undefined;
                    x.requestUpdate('sortDirection');
                }
            });
            this.sortSingle(this._sortDirection, cells);
            return;
        }
        this._tableSortChanged.emit({
            sortKey: this._key,
            sortDirection: this._sortDirection,
            sortIndex: undefined,
            activeSorts: undefined
        });
    }
    /**
     * Multi-sort logic: multiple columns can be sorted simultaneously with priority indices.
     *
     * @private
     */
    sortMultiple(direction, cells) {
        if (direction === 'none') {
            // Removing this column from sort — use unsort() which handles index reflow
            this.unsort();
            return;
        }
        const wasSorted = this.sorted;
        this.sortDirection = direction;
        this.sorted = true;
        this.requestUpdate('sortDirection');
        if (!wasSorted) {
            // New sort entry: assign next available index
            const maxIndex = this.getMaxSortIndex(cells);
            this.sortIndex = maxIndex + 1;
        }
        // If already sorted, keep existing sortIndex, just direction changes
        this._tableSortChanged.emit({
            sortKey: this._key,
            sortDirection: this._sortDirection,
            sortIndex: this._sortIndex,
            activeSorts: this.getActiveSorts()
        });
    }
    /**
     * Returns the highest sort index among sibling header cells (0 if none are sorted).
     *
     * @private
     */
    getMaxSortIndex(cells) {
        if (!cells) {
            return 0;
        }
        let max = 0;
        for (const cell of cells) {
            if (cell.sortIndex !== undefined && cell.sortIndex > max) {
                max = cell.sortIndex;
            }
        }
        return max;
    }
    /**
     * Collects all currently active sorts from sibling header cells, ordered by sort index.
     *
     * @private
     */
    getActiveSorts() {
        if (this.sortMode !== 'multiple') {
            return undefined;
        }
        const cells = this.parentElement
            ? DomServiceLocator.current.findDescendants(this.parentElement, TableHeaderCellElement_1)
            : null;
        if (!cells) {
            return undefined;
        }
        const activeSorts = [];
        for (const cell of cells) {
            if (cell.sorted && cell.sortIndex !== undefined && cell.sortDirection !== 'none') {
                activeSorts.push({
                    sortKey: cell.key,
                    sortDirection: cell.sortDirection,
                    sortIndex: cell.sortIndex
                });
            }
        }
        activeSorts.sort((a, b) => a.sortIndex - b.sortIndex);
        return activeSorts;
    }
};
__decorate([
    Attribute({ type: String }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], TableHeaderCellElement.prototype, "key", null);
__decorate([
    Attribute({
        type: Boolean,
        useDefault: true
    }),
    __metadata("design:type", Boolean),
    __metadata("design:paramtypes", [Boolean])
], TableHeaderCellElement.prototype, "sortable", null);
__decorate([
    Attribute({
        type: Boolean,
        useDefault: true
    }),
    __metadata("design:type", Boolean),
    __metadata("design:paramtypes", [Boolean])
], TableHeaderCellElement.prototype, "pinable", null);
__decorate([
    Attribute({ type: String }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], TableHeaderCellElement.prototype, "sortDirection", null);
__decorate([
    Attribute({
        type: Boolean,
        useDefault: true
    }),
    __metadata("design:type", Boolean),
    __metadata("design:paramtypes", [Boolean])
], TableHeaderCellElement.prototype, "sorted", null);
__decorate([
    Attribute({ type: Number }),
    __metadata("design:type", Object),
    __metadata("design:paramtypes", [Object])
], TableHeaderCellElement.prototype, "sortIndex", null);
__decorate([
    Attribute({
        type: Boolean,
        useDefault: true
    }),
    __metadata("design:type", Boolean),
    __metadata("design:paramtypes", [Boolean])
], TableHeaderCellElement.prototype, "resizable", null);
__decorate([
    Attribute({ type: String }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], TableHeaderCellElement.prototype, "minWidth", null);
__decorate([
    Attribute({ type: String }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], TableHeaderCellElement.prototype, "maxWidth", null);
__decorate([
    Attribute({ type: String }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], TableHeaderCellElement.prototype, "pinned", null);
__decorate([
    Attribute({
        type: Boolean,
        useDefault: true
    }),
    __metadata("design:type", Boolean),
    __metadata("design:paramtypes", [Boolean])
], TableHeaderCellElement.prototype, "columnHidden", null);
__decorate([
    Attribute({
        type: Boolean,
        useDefault: true
    }),
    __metadata("design:type", Boolean),
    __metadata("design:paramtypes", [Boolean])
], TableHeaderCellElement.prototype, "hideable", null);
__decorate([
    Attribute({
        type: Boolean,
        useDefault: true
    }),
    __metadata("design:type", Boolean),
    __metadata("design:paramtypes", [Boolean])
], TableHeaderCellElement.prototype, "autoSizeable", null);
__decorate([
    Attribute({
        type: Boolean,
        useDefault: true
    }),
    __metadata("design:type", Boolean),
    __metadata("design:paramtypes", [Boolean])
], TableHeaderCellElement.prototype, "columnChoosable", null);
__decorate([
    Emit({ eventName: 'tableSortChanged' }),
    __metadata("design:type", Object),
    __metadata("design:paramtypes", [])
], TableHeaderCellElement.prototype, "tableSortChanged", null);
__decorate([
    Emit({ eventName: 'tableColumnResized' }),
    __metadata("design:type", Object),
    __metadata("design:paramtypes", [])
], TableHeaderCellElement.prototype, "tableColumnResized", null);
TableHeaderCellElement = TableHeaderCellElement_1 = __decorate([
    Component({
        selector: 'mosaik-table-header-cell',
        template: tableHeaderCellElementTemplate,
        themes: {
            joy: tableHeaderCellElementJoyStyle,
            memphis: tableHeaderCellElementMemphisStyle,
            cosmopolitan: tableHeaderCellElementCosmopolitanStyle
        },
        imports: [
            TextElement,
            IconElement,
            DividerElement
        ]
    }),
    __metadata("design:paramtypes", [])
], TableHeaderCellElement);
export { TableHeaderCellElement };
//# sourceMappingURL=TableHeaderCellElement.js.map