import { Component, Element, Event, h, Host, Listen, Prop } from '@stencil/core';
export class DvnTableBody {
  constructor() {
    this.separation = 0;
    this.elevation = 0;
  }
  handleScroll() {
    if (this.el.offsetHeight + this.el.scrollTop >= this.el.scrollHeight) {
      this.scrollToBottom.emit();
    }
  }
  render() {
    return (h(Host, { class: {
        [`separated-${this.separation}`]: true,
        [`elevated-${this.elevation}`]: true,
      } },
      h("slot", null)));
  }
  static get is() { return "dvn-table-body"; }
  static get encapsulation() { return "scoped"; }
  static get originalStyleUrls() { return {
    "$": ["dvn-table-body.css"]
  }; }
  static get styleUrls() { return {
    "$": ["dvn-table-body.css"]
  }; }
  static get properties() { return {
    "separation": {
      "type": "number",
      "mutable": false,
      "complexType": {
        "original": "number",
        "resolved": "number",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "separation",
      "reflect": false,
      "defaultValue": "0"
    },
    "elevation": {
      "type": "number",
      "mutable": false,
      "complexType": {
        "original": "0 | 1 | 2 | 3",
        "resolved": "0 | 1 | 2 | 3",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "elevation",
      "reflect": false,
      "defaultValue": "0"
    }
  }; }
  static get events() { return [{
      "method": "scrollToBottom",
      "name": "scrollToBottom",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [],
        "text": ""
      },
      "complexType": {
        "original": "any",
        "resolved": "any",
        "references": {}
      }
    }]; }
  static get elementRef() { return "el"; }
  static get listeners() { return [{
      "name": "scroll",
      "method": "handleScroll",
      "target": undefined,
      "capture": false,
      "passive": true
    }]; }
}
