import { c as create_ssr_component, f as escape, v as validate_component } from "../../../_app/immutable/chunks/index-27250121.js";
import { QueryType } from "@magidoc/plugin-query-generator";
import { F as FieldDetails } from "../../../_app/immutable/chunks/FieldDetails-b075441f.js";
import { i as getMutationByName, f as findPageByHref } from "../../../_app/immutable/chunks/pages-aa8df65b.js";
import { P as PreviousNextPage } from "../../../_app/immutable/chunks/PreviousNextPage-4169f735.js";
import "@magidoc/plugin-starter-variables";
import "lodash";
import "graphql-tag";
import "graphql/language/visitor.mjs";
import "../../../_app/immutable/chunks/ChevronDown-5ea0e6c7.js";
import "../../../_app/immutable/chunks/ArgsList-f5993f6e.js";
import "graphql";
import "../../../_app/immutable/chunks/paths-b9644fda.js";
import "@magidoc/plugin-reverse-schema-mapper";
function load({ params, url }) {
  const field = getMutationByName(params.mutation);
  const page = findPageByHref(url.pathname);
  if (!field || !page) {
    return {
      status: 404,
      error: `Mutation ${params.mutation} not found.`
    };
  }
  return { props: { field, page } };
}
const U5Bmutationu5D = create_ssr_component(($$result, $$props, $$bindings, slots) => {
  let { field } = $$props;
  let { page } = $$props;
  if ($$props.field === void 0 && $$bindings.field && field !== void 0)
    $$bindings.field(field);
  if ($$props.page === void 0 && $$bindings.page && page !== void 0)
    $$bindings.page(page);
  return `${$$result.head += `${$$result.title = `<title>Mutation - ${escape(field.name)}</title>`, ""}`, ""}

${validate_component(FieldDetails, "FieldDetails").$$render($$result, { field, type: QueryType.MUTATION }, {}, {})}

${validate_component(PreviousNextPage, "PreviousNextPage").$$render($$result, { page }, {}, {})}`;
});
export {
  U5Bmutationu5D as default,
  load
};
