import { n as p, C as c } from "../chunks/lib-cortex-element.CVMmyPMC.js";
import { c as h } from "../chunks/component.styles.CRO4Odto.js";
import { c as m } from "../chunks/custom-element.L4WJXn1j.js";
import { w as d } from "../chunks/watch.BCJD77bD.js";
import { i as v, x as f } from "../chunks/lit-element.jLBm65_O.js";
import { e as u } from "../chunks/class-map.BiVq-cVR.js";
const b = v`:host{--padding:0;display:none}::slotted(cx-column){padding:var(--cx-spacing-3x-small);min-height:max(var(--min-height), 24px);max-height:var(--max-height,100%);overflow:auto}:host([active]){display:block}.tab-panel{padding:var(--padding);display:block}`;
var x = Object.defineProperty, g = Object.getOwnPropertyDescriptor, s = (l, a, i, r) => {
  for (var t = r > 1 ? void 0 : r ? g(a, i) : a, o = l.length - 1, n; o >= 0; o--)
    (n = l[o]) && (t = (r ? n(a, i, t) : n(t)) || t);
  return r && t && x(a, i, t), t;
};
let y = 0, e = class extends c {
  constructor() {
    super(...arguments), this.attrId = ++y, this.componentId = `cx-tab-panel-${this.attrId}`, this.name = "", this.active = !1;
  }
  runFirstUpdated() {
    this.id = this.id.length > 0 ? this.id : this.componentId, this.setAttribute("role", "tabpanel");
  }
  handleActiveChange() {
    this.setAttribute("aria-hidden", this.active ? "false" : "true");
  }
  render() {
    return f`<slot part="base" class=${u({
      "tab-panel": !0,
      "tab-panel--active": this.active
    })}></slot>`;
  }
};
e.styles = [h, b];
s([
  p({ reflect: !0 })
], e.prototype, "name", 2);
s([
  p({ reflect: !0, type: Boolean })
], e.prototype, "active", 2);
s([
  d("active")
], e.prototype, "handleActiveChange", 1);
e = s([
  m("cx-tab-panel")
], e);
export {
  e as default
};
