import { Children, createElement } from "react";
import { jsxs, jsx } from "../../node_modules/.pnpm/@emotion_react@11.10.4_q4mq7tnhdumujvomvw24zx33y4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
import "../../lib/useAppState.js";
import "../../components/Tabs.js";
import { PageTile } from "../../page/PageTile.js";
import "react-hot-toast";
import "../../node_modules/.pnpm/react-sortablejs@6.1.4_pkvhgat2fktt3g4eqjjiisgkie/node_modules/react-sortablejs/dist/index.js";
import "./Form.js";
import "../../tailwind.js";
import "../../lib/AppContext.js";
function UiForm({
  Form,
  children,
  contentClassName,
  header,
  ...props
}) {
  const [form] = Form.useForm();
  return /* @__PURE__ */ jsxs(Form, {
    form,
    ...props,
    children: [header && /* @__PURE__ */ jsx(PageTile, {
      ...header
    }), /* @__PURE__ */ jsx("div", {
      className: contentClassName || "",
      children: Children.map(children, (child) => {
        return child.props.name ? createElement(child.type, {
          ...{
            ...child.props,
            layout: props.layout,
            key: child.props.name
          }
        }) : child;
      })
    })]
  });
}
export {
  UiForm
};
//# sourceMappingURL=UiForm.js.map
