import { n as c, C as d } from "../chunks/lib-cortex-element.CVMmyPMC.js";
import { c as p } from "../chunks/component.styles.CRO4Odto.js";
import { c as v } from "../chunks/custom-element.L4WJXn1j.js";
import { w as h } from "../chunks/watch.BCJD77bD.js";
import { i as b, x as g } from "../chunks/lit-element.jLBm65_O.js";
import { n as f } from "../chunks/when.Dr1es41R.js";
const m = b`:host{--color:var(--cx-panel-border-color);--label-color:var(--cx-color-neutral-600);--label-font-size:var(--cx-font-size-small);--width:var(--cx-panel-border-width);--spacing:var(--cx-spacing-medium);--border-style:solid;--padding:var(--spacing)}:host(:not([vertical])){width:100%;display:block}:host(:not([vertical]):not([use-padding])){padding:var(--spacing) 0}.divider__label{text-align:center;margin-bottom:var(--cx-spacing-2x-small);color:var(--label-color);font-size:var(--label-font-size);display:block}:host(:not([vertical])):after{content:" ";border-top:var(--border-style) var(--width) var(--color);display:block}:host([vertical]){height:100%;display:inline-block}:host([vertical]:not([use-padding])){padding:0 var(--spacing)}:host([vertical]):after{content:" ";border-left:var(--border-style) var(--width) var(--color);height:100%;display:inline-block}:host([use-padding]){padding:var(--padding)}`;
var u = Object.defineProperty, y = Object.getOwnPropertyDescriptor, r = (a, l, i, o) => {
  for (var e = o > 1 ? void 0 : o ? y(l, i) : l, s = a.length - 1, n; s >= 0; s--)
    (n = a[s]) && (e = (o ? n(l, i, e) : n(e)) || e);
  return o && e && u(l, i, e), e;
};
let t = class extends d {
  constructor() {
    super(...arguments), this.vertical = !1, this.label = "", this.usePadding = !1;
  }
  connectedCallback() {
    super.connectedCallback(), this.setAttribute("role", "separator");
  }
  handleVerticalChange() {
    this.setAttribute(
      "aria-orientation",
      this.vertical ? "vertical" : "horizontal"
    );
  }
  render() {
    const a = !this.vertical && this.label.length > 0;
    return f(
      a,
      () => g`<span class="divider__label">${this.label}</span>`
    );
  }
};
t.styles = [p, m];
r([
  c({ reflect: !0, type: Boolean })
], t.prototype, "vertical", 2);
r([
  c({ reflect: !0, type: String })
], t.prototype, "label", 2);
r([
  c({ attribute: "use-padding", reflect: !0, type: Boolean })
], t.prototype, "usePadding", 2);
r([
  h("vertical")
], t.prototype, "handleVerticalChange", 1);
t = r([
  v("cx-divider")
], t);
export {
  t as default
};
