import * as React from "react";
import { Menu } from "../../menu/Menu";
import { AdvancedAppLauncher as FinsembleAdvancedAppLauncher } from "./finsembleAdvancedAppLauncher/AdvancedAppLauncher";
import { AdvancedAppLauncher as IOCDAdvancedAppLauncher } from "./iocdAdvancedAppLauncher/AdvancedAppLauncher";
const AdvancedAppLauncherMenu = ({ width = 640, className = "advancedAppLauncher", id = "AdvancedAppLauncherMenu", title = "Apps", customURLValidation = null, customAddComponent = null, beforeAddComponent = null, ...otherProps }) => {
    var _a;
    const advancedLauncherProps = {
        customURLValidation,
        customAddComponent,
        beforeAddComponent,
        enableQuickComponents: (_a = otherProps.enableQuickComponents) !== null && _a !== void 0 ? _a : false,
    };
    const completeProps = {
        ...otherProps,
        ...advancedLauncherProps,
        width,
        className,
        id,
        title,
    };
    const isRunningInIOCD = globalThis.glue42gd;
    // If running in iocd then return the new version that is compatible with io.CD, otherwise return the old version
    // that is compatible with Finsemble
    return (React.createElement(Menu, { ...completeProps }, isRunningInIOCD ? (React.createElement(IOCDAdvancedAppLauncher, { ...advancedLauncherProps })) : (React.createElement(FinsembleAdvancedAppLauncher, { ...advancedLauncherProps }))));
};
export { AdvancedAppLauncherMenu };
//# sourceMappingURL=AdvancedAppLauncherMenu.js.map