'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-305226cb.js');

const BsTabPanel = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.activeTabId = undefined;
    this.tabId = undefined;
  }
  get isActive() {
    return this.activeTabId && this.activeTabId === this.tabId;
  }
  get panelId() {
    return this.hostEl.id || `${this.tabId}-panel`;
  }
  // avoid unnecessary re-renders
  componentShouldUpdate(newValue, oldValue, propName) {
    if (newValue === oldValue)
      return false;
    if (propName === 'activeTabId') {
      return newValue === this.tabId || oldValue === this.tabId;
    }
  }
  render() {
    return (index.h(index.Host, { id: this.panelId, "aria-labelledby": this.tabId, "data-active": this.isActive, role: "tabpanel" }, index.h("slot", null)));
  }
  get hostEl() { return index.getElement(this); }
};

exports.bs_tab_panel = BsTabPanel;

//# sourceMappingURL=bs-tab-panel.cjs.entry.js.map