import React, { useContext, useMemo } from "react";
import classnames from "classnames";
import ActionBarContext from "./ActionBarContext";
import ConfigProviderContext from "../config-provider/ConfigProviderContext";
const ActionBar = (props) => {
  const {
    prefixCls,
    createNamespace
  } = useContext(ConfigProviderContext);
  const [bem] = createNamespace("action-bar", prefixCls);
  const children = useMemo(() => React.Children.toArray(props.children), [props.children]);
  return /* @__PURE__ */ React.createElement(ActionBarContext.Provider, {
    value: {
      parent: {
        children
      }
    }
  }, /* @__PURE__ */ React.createElement("div", {
    className: classnames(props.className, bem(), {
      "rc-safe-area-bottom": props.safeAreaInsetBottom
    }),
    style: props.style
  }, React.Children.toArray(props.children).filter(Boolean).map((child, index) => {
    return /* @__PURE__ */ React.cloneElement(child, {
      index
    });
  })));
};
ActionBar.defaultProps = {
  safeAreaInsetBottom: true
};
var stdin_default = ActionBar;
export {
  stdin_default as default
};
