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, State } from '@stencil/core';
import { sanitizeVegaComponent } from '../../../utils/component';
import { InjectVegaGlobalSlimmer, InjectVegaSlimmer } from 'vega-slimmer/core';
import { VegaComponentUsageRuntimeMetricsSlimmer } from '../../../helpers/slimmers/component-usage-runtime-metrics';
import { ChildNodesEventPreventSlimmer } from '../../../helpers/event-manager/slimmers/child-nodes-event-prevent-slimmer';
import { VegaChange } from '../../../helpers/event-manager/event-id/vega-event-id';
import { VegaTableFootStateController } from './slimmers/controllers/vega-table-foot-state-controller';
/**
 * @vegaVersion 2.68.1
 */
export class VegaTableFoot {
  constructor() {
    this.globalSlimmers = {};
    this.vegaTableFootStateController = new VegaTableFootStateController();
    this.vegaComponentUsageRuntimeMetricsSlimmer = new VegaComponentUsageRuntimeMetricsSlimmer();
    this.childChangeEventPrevent = new ChildNodesEventPreventSlimmer([VegaChange], () => this.host);
    /**
     * Indicates whether the table footer is fixed.
     */
    this.fixed = false;
    /**
     * Indicates whether the table footer has a row divider.
     */
    this.rowDivider = false;
  }
  render() {
    return sanitizeVegaComponent(h(Host, { class: {
        'fixed-footer': this.fixed,
        'row-divider': this.rowDivider,
      }, ref: (ref) => this.vegaTableFootStateController.handleTableFootRefChange(ref) },
      h("tfoot", null,
        h("slot", null))), this.host);
  }
  static get is() { return "vega-table-foot"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["vega-table-foot.scss"]
  }; }
  static get styleUrls() { return {
    "$": ["vega-table-foot.css"]
  }; }
  static get states() { return {
    "fixed": {},
    "rowDivider": {}
  }; }
  static get elementRef() { return "host"; }
}
__decorate([
  InjectVegaGlobalSlimmer()
], VegaTableFoot.prototype, "globalSlimmers", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaTableFoot.prototype, "vegaTableFootStateController", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaTableFoot.prototype, "vegaComponentUsageRuntimeMetricsSlimmer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaTableFoot.prototype, "childChangeEventPrevent", void 0);
