// interface PluginRegistry {}
import { jsx as _jsx } from "react/jsx-runtime";
import { ExtensionProvider } from "./pluginContext";
import { OrderlyExtensionRegistry } from "./registry";
// type ExtensionRenderComponent = (
//   component: ExtensionRenderComponentType<Props>
// ) => void;
export const installExtension = (options)=>{
    return (component)=>{
        const registry = OrderlyExtensionRegistry.getInstance();
        registry.register({
            name: options.name,
            positions: options.positions,
            __isInternal: !!options.__isInternal,
            render: (props)=>{
                ;
                const children = typeof component === "function" ? component(props) : component;
                return /*#__PURE__*/ _jsx(ExtensionProvider, {
                    children: children
                });
            }
        });
    };
};

//# sourceMappingURL=install.js.map