import e, { useMemo as t } from "react";
import n from "lodash/isPlainObject.js";
import r from "swagger-ui-react";
import i from "./plugins/layout/index.js";
import a from "./plugins/splash-screen/index.js";
import o from "./plugins/top-bar/index.js";
import s from "./plugins/modals/index.js";
import c from "./plugins/dialogs/index.js";
import l from "./plugins/dropdown-menu/index.js";
import u from "./plugins/dropzone/index.js";
import d from "./plugins/versions/index.js";
import f from "./plugins/editor-textarea/index.js";
import p from "./plugins/editor-monaco/index.js";
import m from "./plugins/editor-monaco-language-apidom/index.js";
import h from "./plugins/editor-monaco-yaml-paste/index.js";
import g from "./plugins/editor-preview/index.js";
import _ from "./plugins/editor-preview-swagger-ui/index.js";
import v from "./plugins/editor-preview-asyncapi/index.js";
import y from "./plugins/editor-preview-api-design-systems/index.js";
import b from "./plugins/editor-content-read-only/index.js";
import x from "./plugins/editor-content-origin/index.js";
import S from "./plugins/editor-content-type/index.js";
import C from "./plugins/editor-content-persistence/index.js";
import w from "./plugins/editor-content-fixtures/index.js";
import T from "./plugins/editor-content-from-file/index.js";
import E from "./plugins/editor-safe-render/index.js";
import D from "./plugins/swagger-ui-adapter/index.js";
import O from "./plugins/props-change-watcher/index.js";
import k from "./plugins/util/index.js";
import A from "./presets/textarea/index.js";
import j from "./presets/monaco/index.js";
//#region src/App.tsx
var M = e.memo(({ spec: i = r.config.defaults.spec, url: a = r.config.defaults.url, layout: o = "SwaggerEditorLayout", requestInterceptor: s = r.config.defaults.requestInterceptor, responseInterceptor: c = r.config.defaults.responseInterceptor, supportedSubmitMethods: l = r.config.defaults.supportedSubmitMethods, queryConfigEnabled: u = r.config.defaults.queryConfigEnabled, plugins: d = [...r.config.defaults.plugins], displayOperationId: f = r.config.defaults.displayOperationId, showMutatedRequest: p = r.config.defaults.showMutatedRequest, docExpansion: m = r.config.defaults.docExpansion, defaultModelExpandDepth: h = r.config.defaults.defaultModelExpandDepth, defaultModelsExpandDepth: g = r.config.defaults.defaultModelsExpandDepth, defaultModelRendering: _ = r.config.defaults.defaultModelRendering, presets: v = M.presets?.default ? [M.presets.default] : [], deepLinking: y = r.config.defaults.deepLinking, showExtensions: b = !0, showCommonExtensions: x = r.config.defaults.showCommonExtensions, filter: S = r.config.defaults.filter, requestSnippetsEnabled: C = r.config.defaults.requestSnippetsEnabled, requestSnippets: w = r.config.defaults.requestSnippets, tryItOutEnabled: T = r.config.defaults.tryItOutEnabled, displayRequestDuration: E = r.config.defaults.displayRequestDuration, withCredentials: D = r.config.defaults.withCredentials, persistAuthorization: k = r.config.defaults.persistAuthorization, oauth2RedirectUrl: A = r.config.defaults.oauth2RedirectUrl, initialState: j = r.config.defaults.initialState, onComplete: N = null }) => {
	let { plugin: P, getSystem: F } = O.useMountPlugin(), I = t(() => i !== r.config.defaults.spec && n(i) ? JSON.stringify(i, null, 2) : i, [i]);
	return O.usePropChange(i, (e, t) => {
		F()?.editorActions?.propChanged("spec", e, t);
	}), O.usePropChange(a, (e, t) => {
		F()?.editorActions?.propChanged("url", e, t);
	}), /* @__PURE__ */ e.createElement("div", { className: "swagger-editor" }, /* @__PURE__ */ e.createElement(r, {
		spec: I,
		url: a,
		layout: o,
		requestInterceptor: s,
		responseInterceptor: c,
		supportedSubmitMethods: l,
		queryConfigEnabled: u,
		plugins: [P, ...d],
		displayOperationId: f,
		showMutatedRequest: p,
		docExpansion: m,
		defaultModelExpandDepth: h,
		defaultModelsExpandDepth: g,
		defaultModelRendering: _,
		presets: v,
		deepLinking: y,
		showExtensions: b,
		showCommonExtensions: x,
		filter: S,
		requestSnippetsEnabled: C,
		requestSnippets: w,
		tryItOutEnabled: T,
		displayRequestDuration: E,
		withCredentials: D,
		persistAuthorization: k,
		oauth2RedirectUrl: A,
		initialState: j,
		onComplete: N
	}));
});
M.plugins = {
	Util: k,
	Modals: s,
	Dialogs: c,
	DropdownMenu: l,
	Dropzone: u,
	Versions: d,
	EditorTextarea: f,
	EditorMonaco: p,
	EditorMonacoLanguageApiDOM: m,
	EditorMonacoYamlPaste: h,
	EditorContentReadOnly: b,
	EditorContentOrigin: x,
	EditorContentType: S,
	EditorContentPersistence: C,
	EditorContentFixtures: w,
	EditorContentFromFile: T,
	EditorPreview: g,
	EditorPreviewSwaggerUI: _,
	EditorPreviewAsyncAPI: v,
	EditorPreviewApiDesignSystems: y,
	EditorSafeRender: E,
	TopBar: o,
	SplashScreenPlugin: a,
	Layout: i,
	SwaggerUIAdapter: D
}, M.presets = {
	textarea: A,
	monaco: j,
	default: j
};
//#endregion
export { M as default };

//# sourceMappingURL=swagger-editor.js.map