import { n as e } from "../../fn-BbK27qJY.js";
//#region src/plugins/editor-content-persistence/extensions/editor-textarea/wrap-actions.js
var t = e((e, t) => (e) => {
	let { editorContentPersistence: n, editorSelectors: r, EditorContentOrigin: i } = t, a = r.selectContentOrigin();
	a === i.Props ? n.remove() : a !== i.InitialFixtureLoad && n.set(e);
}), n = "swagger-editor-content", r = (e) => localStorage.setItem(n, e), i = () => localStorage.getItem(n), a = () => i() !== null, o = () => {
	localStorage.removeItem(n);
}, s = {
	has() {
		return a();
	},
	set(e) {
		return r(e);
	},
	get() {
		return i();
	},
	remove() {
		o();
	}
}, c = (e) => {
	let { editorContentPersistence: t, editorActions: n, editorSelectors: r, EditorContentOrigin: i } = e, a = t.get();
	a !== null && r.selectContent() !== a && n.setContent(a, i.LocalStorage);
}, l = () => ({
	afterLoad: c,
	rootInjects: { editorContentPersistence: s },
	statePlugins: { editor: { wrapActions: { setContent: t } } }
});
//#endregion
export { l as default };

//# sourceMappingURL=index.js.map