import { useEffect, useState } from 'react';
import { useWixPatternsContainer } from '@wix/bex-core/react';
export const useExploreAppsState = (exploreAppsModalProps) => {
    const { reportBi, translate } = useWixPatternsContainer();
    const [exploreAppsState, setExploreAppsState] = useState();
    useEffect(() => {
        if (!exploreAppsModalProps) {
            return;
        }
        import('./ExploreAppsState').then(({ ExploreAppsState }) => {
            setExploreAppsState(new ExploreAppsState({
                modalProps: exploreAppsModalProps,
                reportBi,
                translatedText: translate('cairo.collectionPage.appInstall-inContext.moreActions.relatedApps.CTA'),
            }));
        });
    }, []);
    return exploreAppsState;
};
//# sourceMappingURL=useExploreAppsState.js.map