import { jsx as s } from "react/jsx-runtime";
import a from "./result.js";
import * as t from "./common.js";
const r = Object.keys(t).reduce(
  (o, e) => ({ ...o, [t[e].status || e]: t[e] }),
  {}
);
function p({ status: o = "", ...e }) {
  if (o) {
    if (r[o]) {
      const n = r[o];
      return /* @__PURE__ */ s(n, { ...e });
    }
    throw new Error(
      `Please provide a valid status for Result.status. Valid values are: ${Object.keys(r).join(
        ", "
      )}`
    );
  }
  return /* @__PURE__ */ s(a, { ...e });
}
export {
  p as default
};
