import { n as e } from "../../fn-BbK27qJY.js";
//#region src/plugins/editor-content-from-file/extensions/top-bar/wrap-actions.js
var t = e((e, t) => async ({ definition: e }) => {
	let { editorActions: n, fn: r, EditorContentOrigin: i } = t;
	if (r.isValidJSONObject(e) || r.isValidJSONArray(e)) {
		let t = await n.convertContentToYAML(e);
		t.error || n.setContent(t.payload, i.ImportUrl);
	}
}), n = e((e, t) => async ({ content: e }) => {
	let { editorActions: n, fn: r, EditorContentOrigin: i } = t;
	if (r.isValidJSONObject(e) || r.isValidJSONArray(e)) {
		let t = await n.convertContentToYAML(e);
		t.error || n.setContent(t.payload, i.ImportFile);
	}
}), r = e((e, t) => async ({ content: e }) => {
	let { editorActions: n, fn: r, EditorContentOrigin: i } = t;
	if (r.isValidJSONObject(e) || r.isValidJSONArray(e)) {
		let t = await n.convertContentToYAML(e);
		t.error || n.setContent(t.payload, i.FileDrop);
	}
}), i = () => ({ statePlugins: {
	editor: { wrapActions: {
		importUrlSuccess: t,
		uploadFileSuccess: n
	} },
	editorDropzone: { wrapActions: { dropFileSuccess: r } }
} });
//#endregion
export { i as default };

//# sourceMappingURL=index.js.map