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, Prop, Element, State, Watch } from '@stencil/core';
import { VegaTableExpandRowRenderer } from './slimmers/renderers/vega-table-expand-row-renderer';
import { slotPlaceholder, InjectVegaSlimmer, methodPlaceholder, InjectVegaGlobalSlimmer, } from 'vega-slimmer/core';
import { VegaTableExpandRowExpandController } from './slimmers/controllers/vega-table-expand-row-expand-controller';
import { VegaTableExpandRowSelectionController } from './slimmers/controllers/vega-table-expand-row-selection-controller';
import { sanitizeVegaComponent } from '../../../utils/component';
import { VegaTableExpandRowStateController } from './slimmers/controllers/vega-table-expand-row-state-controller';
import { getCurrentBreakpoint } from '../../../utils/breakpoints';
import { VegaTableExpandRowColSpanController } from './slimmers/controllers/vega-table-expand-row-col-span-controller';
import { PageResizeObserverSlimmer } from '../../../helpers/slimmers/page-resize-observer-slimmer';
import { VegaComponentUsageRuntimeMetricsSlimmer } from '../../../helpers/slimmers/component-usage-runtime-metrics';
/**
 * @vegaVersion 1.44.0
 */
export class VegaTableExpandRow {
  constructor() {
    this.globalSlimmers = {};
    this.vegaTableExpandRowRenderer = new VegaTableExpandRowRenderer();
    this.vegaTableExpandRowExpandController = new VegaTableExpandRowExpandController();
    this.vegaTableExpandRowSelectionController = new VegaTableExpandRowSelectionController();
    this.vegaTableExpandRowStateController = new VegaTableExpandRowStateController();
    this.vegaTableExpandRowColSpanController = new VegaTableExpandRowColSpanController();
    this.pageResizeObserverSlimmer = new PageResizeObserverSlimmer();
    this.vegaComponentUsageRuntimeMetricsSlimmer = new VegaComponentUsageRuntimeMetricsSlimmer();
    this.currentBreakpoint = getCurrentBreakpoint();
    /**
     * Indicates whether the row is expanded.
     */
    this.expanded = false;
    /**
     * Indicates whether the row's checkbox is checked.
     */
    this.checked = false;
  }
  /*
   * The next line is covered in e2e-test
   * @see{should-render-responsive-columns-with-expandable-row-and-current-breakpoint-changed}
   */
  /* istanbul ignore next */
  watchCurrentBreakpoint() {
    methodPlaceholder();
  }
  watchWithMultipleSelection() {
    methodPlaceholder();
  }
  watchWithRowDraggable() {
    methodPlaceholder();
  }
  render() {
    slotPlaceholder(h("slot", null));
    return sanitizeVegaComponent(h(Host, null, this.vegaTableExpandRowRenderer.render()), this.host);
  }
  static get is() { return "vega-table-expand-row"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["vega-table-expand-row.scss"]
  }; }
  static get styleUrls() { return {
    "$": ["vega-table-expand-row.css"]
  }; }
  static get properties() { return {
    "rowKey": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": true,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "1.44.0"
          }],
        "text": "Defines a unique key for the expandable row within the table."
      },
      "attribute": "row-key",
      "reflect": false
    },
    "striped": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.61.0"
          }],
        "text": "Specifies whether alternate colors should be applied to the expand row."
      },
      "attribute": "striped",
      "reflect": false
    }
  }; }
  static get states() { return {
    "currentBreakpoint": {},
    "withMultipleSelection": {},
    "withRowDraggable": {},
    "expanded": {},
    "checked": {},
    "colSpan": {}
  }; }
  static get elementRef() { return "host"; }
  static get watchers() { return [{
      "propName": "currentBreakpoint",
      "methodName": "watchCurrentBreakpoint"
    }, {
      "propName": "withMultipleSelection",
      "methodName": "watchWithMultipleSelection"
    }, {
      "propName": "withRowDraggable",
      "methodName": "watchWithRowDraggable"
    }]; }
}
__decorate([
  InjectVegaGlobalSlimmer()
], VegaTableExpandRow.prototype, "globalSlimmers", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaTableExpandRow.prototype, "vegaTableExpandRowRenderer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaTableExpandRow.prototype, "vegaTableExpandRowExpandController", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaTableExpandRow.prototype, "vegaTableExpandRowSelectionController", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaTableExpandRow.prototype, "vegaTableExpandRowStateController", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaTableExpandRow.prototype, "vegaTableExpandRowColSpanController", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaTableExpandRow.prototype, "pageResizeObserverSlimmer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaTableExpandRow.prototype, "vegaComponentUsageRuntimeMetricsSlimmer", void 0);
