import { usePluginManager } from "../../plugins/hooks/usePluginManager.js";
import { Fragment, createBlock, createCommentVNode, createElementBlock, defineComponent, mergeProps, openBlock, renderList, resolveDynamicComponent, unref, withCtx } from "vue";
import { ScalarErrorBoundary } from "@scalar/components";
//#region src/components/RenderPlugins/RenderPlugins.vue?vue&type=script&setup=true&lang.ts
var _hoisted_1 = {
	key: 0,
	class: "plugin-view"
};
var RenderPlugins_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
	__name: "RenderPlugins",
	props: {
		viewName: {},
		options: {}
	},
	setup(__props) {
		const { getViewComponents } = usePluginManager();
		const components = getViewComponents(__props.viewName);
		return (_ctx, _cache) => {
			return unref(components).length ? (openBlock(), createElementBlock("div", _hoisted_1, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(components), (item, _index) => {
				return openBlock(), createBlock(unref(ScalarErrorBoundary), { key: _index }, {
					default: withCtx(() => [item.renderer ? (openBlock(), createBlock(resolveDynamicComponent(item.renderer), mergeProps({
						key: 0,
						ref_for: true
					}, {
						component: item.component,
						options: __props.options,
						...item.props
					}), null, 16)) : (openBlock(), createBlock(resolveDynamicComponent(item.component), mergeProps({
						key: 1,
						ref_for: true
					}, {
						options: __props.options,
						...item.props
					}), null, 16))]),
					_: 2
				}, 1024);
			}), 128))])) : createCommentVNode("", true);
		};
	}
});
//#endregion
export { RenderPlugins_vue_vue_type_script_setup_true_lang_default as default };

//# sourceMappingURL=RenderPlugins.vue.script.js.map