Files
chatwoot/app/javascript/dashboard/composables/useWhatsappEmbeddedSignup.js
T
2025-06-11 15:01:53 +05:30

34 lines
1023 B
JavaScript

import { useStore } from 'vuex';
import { useRouter } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { useWhatsappComposableOrchestrator } from './whatsapp/useWhatsappComposableOrchestrator';
import { useWhatsappLifecycle } from './whatsapp/useWhatsappLifecycle';
import { useWhatsappComputed } from './whatsapp/useWhatsappComputed';
export function useWhatsappEmbeddedSignup() {
const store = useStore();
const router = useRouter();
const { t } = useI18n();
const orchestratorResult = useWhatsappComposableOrchestrator({
store,
router,
t,
});
const computedResult = useWhatsappComputed({
t,
hasSignupStarted: orchestratorResult.hasSignupStarted,
isProcessing: orchestratorResult.isProcessing,
});
const lifecycleResult = useWhatsappLifecycle({
loadFacebookSdk: orchestratorResult.loadFacebookSdk,
handleSignupMessage: orchestratorResult.handleSignupMessage,
});
return {
...orchestratorResult,
...computedResult,
...lifecycleResult,
};
}