import { j as e } from "./index.es36.js";
import { useCallback as m } from "react";
import a from "./index.es38.js";
import "./index.es39.js";
import "./index.es40.js";
import "./index.es41.js";
import "./index.es42.js";
import "./index.es43.js";
import "./index.es44.js";
import "./index.es45.js";
import "./index.es46.js";
import "./index.es47.js";
import "./index.es48.js";
import "./index.es49.js";
import "./index.es50.js";
import "./index.es51.js";
import "./index.es52.js";
import "./index.es53.js";
import "./index.es54.js";
import "./index.es55.js";
import "./index.es56.js";
import "./index.es57.js";
import "./index.es58.js";
import "./index.es59.js";
import "./index.es60.js";
import "./index.es61.js";
import "./index.es62.js";
import "./index.es63.js";
import "./index.es64.js";
import "./index.es65.js";
import u from "./index.es14.js";
import E from "./index.es3.js";
const Y = (p, t) => (n) => {
  const { id: s } = t;
  let i;
  const l = m((o) => {
    const r = {};
    return t.resolveValidationError && a.extend(r, t.resolveValidationError(o)), o.status === 403 && a.extend(r, { base: u.t("Common.errors.unauthorized") }), r;
  }, [t.resolveValidationError]), d = m((o) => t.onSave(o).then((r) => t.afterSave && t.afterSave(r, i)), [t.afterSave, t.onSave]), v = E((o) => /* @__PURE__ */ e.jsx(
    p,
    {
      ...o,
      onTabClick: (r) => {
        i = r;
      }
    }
  ));
  return /* @__PURE__ */ e.jsx(
    v,
    {
      ...n,
      item: { id: s },
      onCancel: t.onCancel,
      onInitialize: t.onInitialize,
      onSave: d,
      required: t.required,
      resolveValidationError: l,
      validate: t.validate
    }
  );
};
export {
  Y as default
};
//# sourceMappingURL=index.es13.js.map
