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;
};
import { Component, Host, h, Element, Prop, State } from '@stencil/core';
import { InjectVegaGlobalSlimmer, InjectVegaSlimmer, slotPlaceholder, } from 'vega-slimmer/core';
import { VegaTableHeadRowRenderer } from './slimmers/renderers/vega-table-head-row-renderer';
import { sanitizeVegaComponent } from '../../../utils/component';
import { VegaTableHeadRowController } from './slimmers/controllers/vega-table-head-row-controller';
import { VegaTableHeadRowStateController } from './slimmers/controllers/vega-table-head-row-state-controller';
import { ChildNodesEventPreventSlimmer } from '../../../helpers/event-manager/slimmers/child-nodes-event-prevent-slimmer';
import { VegaClick } from '../../../helpers/event-manager/event-id/vega-event-id';
import ResponsiveFormatFacade from '../../../helpers/formatter/responsive-map-formatter/responsive-format-facade';
import { getCurrentBreakpoint } from '../../../utils/breakpoints';
import { PageResizeObserverSlimmer } from '../../../helpers/slimmers/page-resize-observer-slimmer';
import { VegaComponentUsageRuntimeMetricsSlimmer } from '../../../helpers/slimmers/component-usage-runtime-metrics';
import { VegaTableChildRenderInputConsumerSlimmer } from '../../../helpers/slimmers/vega-table-child-render-input-consumer-slimmer';
import { VegaInternalColumnHeadRowRenderInputRIC } from '../../../helpers/event-manager/event-id/vega-internal-event-id';
/**
 * @vegaVersion 1.44.0
 */
export class VegaTableHeadRow {
  constructor() {
    this.globalSlimmers = {};
    this.vegaTableHeadRowStateController = new VegaTableHeadRowStateController();
    this.vegaTableHeadRowRenderer = new VegaTableHeadRowRenderer();
    this.vegaTableHeadRowController = new VegaTableHeadRowController();
    this.headCellEventPrevent = new ChildNodesEventPreventSlimmer([VegaClick], () => this.host, undefined, true);
    this.pageResizeObserverSlimmer = new PageResizeObserverSlimmer();
    this.vegaComponentUsageRuntimeMetricsSlimmer = new VegaComponentUsageRuntimeMetricsSlimmer();
    this.vegaTableRenderInputConsumerSlimmer = new VegaTableChildRenderInputConsumerSlimmer(VegaInternalColumnHeadRowRenderInputRIC);
    this.currentBreakpoint = getCurrentBreakpoint();
    /**
     * Indicates whether the row is expandable.
     */
    this.expandable = false;
  }
  render() {
    slotPlaceholder(h("slot", null));
    return sanitizeVegaComponent(h(Host, { class: {
        'column-divider': this.columnDivider,
        [`density-${ResponsiveFormatFacade.formatCustom(this.density)}`]: true,
      } }, this.vegaTableHeadRowRenderer.render()), this.host);
  }
  static get is() { return "vega-table-head-row"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["vega-table-head-row.scss"]
  }; }
  static get styleUrls() { return {
    "$": ["vega-table-head-row.css"]
  }; }
  static get properties() { return {
    "selectAllDisabled": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": true,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "1.44.0"
          }],
        "text": "Indicates whether the checkbox is disabled."
      },
      "attribute": "select-all-disabled",
      "reflect": false
    },
    "hideSelectAll": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": true,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "1.44.0"
          }],
        "text": "Determines whether to hide the select all checkbox."
      },
      "attribute": "hide-select-all",
      "reflect": false
    }
  }; }
  static get states() { return {
    "currentBreakpoint": {},
    "expandable": {},
    "selectionType": {},
    "paddingX": {},
    "checkedAll": {},
    "columnDivider": {},
    "density": {},
    "isEmptyTable": {},
    "isTemplateRenderMode": {},
    "renderInput": {}
  }; }
  static get elementRef() { return "host"; }
}
__decorate([
  InjectVegaGlobalSlimmer()
], VegaTableHeadRow.prototype, "globalSlimmers", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaTableHeadRow.prototype, "vegaTableHeadRowStateController", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaTableHeadRow.prototype, "vegaTableHeadRowRenderer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaTableHeadRow.prototype, "vegaTableHeadRowController", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaTableHeadRow.prototype, "headCellEventPrevent", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaTableHeadRow.prototype, "pageResizeObserverSlimmer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaTableHeadRow.prototype, "vegaComponentUsageRuntimeMetricsSlimmer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaTableHeadRow.prototype, "vegaTableRenderInputConsumerSlimmer", void 0);
