import { jsx as n } from "react/jsx-runtime";
import { createRecipeContext as f, useRecipe as $, useChakraContext as m, useBreakpointValue as p } from "@chakra-ui/react";
import { e as b } from "./extract-style-props-BdibuNZ7.es.js";
import { c as u } from "./index-C2qW4ynb.es.js";
import { $ as x, a as P } from "./utils-B6pV5ewr.es.js";
import { $ as h } from "./useToolbar-CbJkugif.es.js";
import { $ as C } from "./mergeProps-Dsl8k3Ig.es.js";
import { $ as z } from "./filterDOMProps-BSVCO5jK.es.js";
import R, { forwardRef as y, createContext as T } from "react";
const v = /* @__PURE__ */ T({}), k = /* @__PURE__ */ y(function(o, t) {
  [o, t] = x(o, t, v);
  let { toolbarProps: a } = h(o, t), e = P({
    ...o,
    values: {
      orientation: o.orientation || "horizontal"
    },
    defaultClassName: "react-aria-Toolbar"
  }), r = z(o, {
    global: !0
  });
  return delete r.id, /* @__PURE__ */ R.createElement("div", {
    ...C(r, e, a),
    ref: t,
    slot: o.slot || void 0,
    "data-orientation": o.orientation || "horizontal"
  }, e.children);
}), { withContext: O } = /* @__PURE__ */ f({
  key: "toolbar"
}), V = /* @__PURE__ */ O(
  "div"
), N = ({
  ref: i,
  orientation: o = "horizontal",
  ...t
}) => {
  const a = $({ recipe: u }), [e, r] = a.splitVariantProps({
    orientation: o,
    ...t
  }), [c, s] = b(r), l = m().normalizeValue(o), d = p(l) ?? "horizontal";
  return /* @__PURE__ */ n(
    V,
    {
      orientation: o,
      ...e,
      ...c,
      asChild: !0,
      children: /* @__PURE__ */ n(
        k,
        {
          ref: i,
          orientation: d,
          ...s
        }
      )
    }
  );
};
export {
  N as T
};
//# sourceMappingURL=toolbar-C7-6gqba.es.js.map
