import { $ as m } from "./utils-CrjF8U_E.es.js";
import { $ as b, a as u } from "./CollectionBuilder-CTjJUDzO.es.js";
import { $ as x } from "./mergeProps-B-cqsBhL.es.js";
import { $ as s } from "./filterDOMProps-Cxz9cAAv.es.js";
import y, { createContext as v } from "react";
function P(a) {
  let e = s(a, {
    labelable: !0
  }), t;
  return a.orientation === "vertical" && (t = "vertical"), a.elementType !== "hr" ? {
    separatorProps: {
      ...e,
      role: "separator",
      "aria-orientation": t
    }
  } : {
    separatorProps: e
  };
}
const h = /* @__PURE__ */ v({});
class f extends u {
  filter(e, t) {
    let r = t.getItem(this.prevKey);
    if (r && r.type !== "separator") {
      let o = this.clone();
      return t.addDescendants(o, e), o;
    }
    return null;
  }
}
f.type = "separator";
const E = /* @__PURE__ */ b(f, function(e, t) {
  [e, t] = m(e, t, h);
  let { elementType: r, orientation: o, style: i, className: l, slot: $, ...c } = e, n = r || "hr";
  n === "hr" && o === "vertical" && (n = "div");
  let { separatorProps: p } = P({
    ...c,
    elementType: r,
    orientation: o
  }), d = s(e, {
    global: !0
  });
  return /* @__PURE__ */ y.createElement(n, {
    ...x(d, p),
    style: i,
    className: l ?? "react-aria-Separator",
    ref: t,
    slot: $ || void 0
  });
});
export {
  E as $,
  h as a
};
//# sourceMappingURL=Separator-DFaT-SpI.es.js.map
