import { c as create_ssr_component, v as validate_component } from "./index-0e008fb3.js";
import get from "lodash/get.js";
import { E as Editor } from "./editor-8f7742a9.js";
const Error = create_ssr_component(($$result, $$props, $$bindings, slots) => {
  let { error } = $$props;
  function toString(err) {
    if (!err) {
      return "";
    }
    let str = `${err.message}`;
    let details = get(err, "response.data.details");
    if (!!details) {
      str += `
${JSON.stringify(details, null, 2)}
`;
    }
    return str;
  }
  if ($$props.error === void 0 && $$bindings.error && error !== void 0)
    $$bindings.error(error);
  return `${validate_component(Editor, "Editor").$$render($$result, {
    language: "json",
    isReadonly: true,
    value: toString(error)
  }, {}, {})}`;
});
export { Error as E };
