import { o as d } from "./rolldown-runtime.js";
import { i as g, t as m } from "./vendor/react.js";
import { a as p, i as u, n as C, o as f, r as _, t as h } from "./_shared.js";
import { n as j, r as v, t as x } from "./CollapsiblePanel.js";
var o = m();
function l({ ...e }) {
  return /* @__PURE__ */ (0, o.jsx)(v, {
    "data-slot": "collapsible",
    ...e
  });
}
function s({ ...e }) {
  return /* @__PURE__ */ (0, o.jsx)(j, {
    "data-slot": "collapsible-trigger",
    ...e
  });
}
function r({ ...e }) {
  return /* @__PURE__ */ (0, o.jsx)(x, {
    "data-slot": "collapsible-content",
    ...e
  });
}
l.displayName = "Collapsible";
s.displayName = "CollapsibleTrigger";
r.displayName = "CollapsibleContent";
var E = Object.assign(l, {
  Root: l,
  Trigger: s,
  Content: r
}), t = /* @__PURE__ */ d(g(), 1), a = {
  open: "boolean",
  defaultOpen: "boolean",
  disabled: "boolean"
}, c = class extends h {
  get propDefs() {
    return a;
  }
  static get observedAttributes() {
    return Object.keys(a).map(C);
  }
  _renderReact() {
    const e = this._readAllProps(), n = this._getSlot("trigger"), i = this._getSlot("content");
    return t.createElement(E, {
      open: e.open,
      defaultOpen: e.defaultOpen || !1,
      disabled: e.disabled || !1,
      onOpenChange: (b) => _(this, "open-change", b)
    }, n ? t.createElement(s, { render: t.createElement("span", { style: { display: "contents" } }, p(n)) }) : null, i ? t.createElement(r, null, p(i)) : null);
  }
};
u(c, a);
f("hf-collapsible", c);
export {
  c as CollapsibleWC,
  c as default
};

//# sourceMappingURL=hf-collapsible.js.map