@phonghq/go-chat 1.0.69 → 1.0.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,6 +16,7 @@ declare const _default: import("vue").DefineComponent<GoChatProps, GoChatInstanc
16
16
  onEndCall?: (() => any) | undefined;
17
17
  "onError:noPhoneTenant"?: (() => any) | undefined;
18
18
  }>, {
19
+ isLib: boolean;
19
20
  response: PAGE_RESPONSIVE;
20
21
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
22
  export default _default;
@@ -91,7 +91,8 @@ const routerMobileConfig = computed(() => [
91
91
  }
92
92
  ]);
93
93
  const props = withDefaults(defineProps(), {
94
- response: 'tablet'
94
+ response: 'tablet',
95
+ isLib: true
95
96
  });
96
97
  const emit = defineEmits();
97
98
  let initTimer = null;
@@ -224,7 +225,8 @@ defineExpose({
224
225
  });
225
226
  debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
226
227
  const __VLS_defaults = {
227
- response: 'tablet'
228
+ response: 'tablet',
229
+ isLib: true
228
230
  };
229
231
  const __VLS_ctx = {
230
232
  ...{},
@@ -286,21 +288,54 @@ else if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_SUCCESS) {
286
288
  else if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.NOT_TENANT_PHONE) {
287
289
  // @ts-ignore
288
290
  [currentPage, PAGE,];
291
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
292
+ ...{ class: "h-full p-5 flex flex-col" },
293
+ });
294
+ if (props.isLib) {
295
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
296
+ ...{ class: "shrink-0 flex items-center justify-between" },
297
+ });
298
+ __VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({});
299
+ __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
300
+ ...{ onClick: (...[$event]) => {
301
+ if (!!(!__VLS_ctx.isRouterReady))
302
+ return;
303
+ if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.TENANT_ERROR))
304
+ return;
305
+ if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_TENANT))
306
+ return;
307
+ if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_SUCCESS))
308
+ return;
309
+ if (!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.NOT_TENANT_PHONE))
310
+ return;
311
+ if (!(props.isLib))
312
+ return;
313
+ __VLS_ctx.handleCloseBtn();
314
+ // @ts-ignore
315
+ [handleCloseBtn,];
316
+ } },
317
+ ...{ class: "w-10 h-10" },
318
+ });
319
+ /** @type {[typeof IconCloseCircle, ]} */ ;
320
+ // @ts-ignore
321
+ const __VLS_16 = __VLS_asFunctionalComponent(IconCloseCircle, new IconCloseCircle({}));
322
+ const __VLS_17 = __VLS_16({}, ...__VLS_functionalComponentArgsRest(__VLS_16));
323
+ }
289
324
  /** @type {[typeof NotTenantPhone, ]} */ ;
290
325
  // @ts-ignore
291
- const __VLS_16 = __VLS_asFunctionalComponent(NotTenantPhone, new NotTenantPhone({
326
+ const __VLS_20 = __VLS_asFunctionalComponent(NotTenantPhone, new NotTenantPhone({
292
327
  ...{ 'onTryAgain': {} },
293
- ...{ class: "bg-white" },
328
+ ...{ class: "bg-white grow" },
294
329
  isLib: (props.isLib),
295
330
  }));
296
- const __VLS_17 = __VLS_16({
331
+ const __VLS_21 = __VLS_20({
297
332
  ...{ 'onTryAgain': {} },
298
- ...{ class: "bg-white" },
333
+ ...{ class: "bg-white grow" },
299
334
  isLib: (props.isLib),
300
- }, ...__VLS_functionalComponentArgsRest(__VLS_16));
301
- let __VLS_19;
302
- let __VLS_20;
303
- const __VLS_21 = ({ tryAgain: {} },
335
+ }, ...__VLS_functionalComponentArgsRest(__VLS_20));
336
+ let __VLS_23;
337
+ let __VLS_24;
338
+ const __VLS_25 = ({ tryAgain: {} },
304
339
  { onTryAgain: (...[$event]) => {
305
340
  if (!!(!__VLS_ctx.isRouterReady))
306
341
  return;
@@ -316,7 +351,7 @@ else if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.NOT_TENANT_PHONE) {
316
351
  // @ts-ignore
317
352
  [handleInitPage,];
318
353
  } });
319
- var __VLS_18;
354
+ var __VLS_22;
320
355
  }
321
356
  else {
322
357
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
@@ -327,12 +362,12 @@ else {
327
362
  [isLib,];
328
363
  /** @type {[typeof PageError, ]} */ ;
329
364
  // @ts-ignore
330
- const __VLS_23 = __VLS_asFunctionalComponent(PageError, new PageError({
365
+ const __VLS_27 = __VLS_asFunctionalComponent(PageError, new PageError({
331
366
  ...{ class: "shrink-0" },
332
367
  }));
333
- const __VLS_24 = __VLS_23({
368
+ const __VLS_28 = __VLS_27({
334
369
  ...{ class: "shrink-0" },
335
- }, ...__VLS_functionalComponentArgsRest(__VLS_23));
370
+ }, ...__VLS_functionalComponentArgsRest(__VLS_27));
336
371
  }
337
372
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
338
373
  ...{ class: "w-full grow flex overflow-hidden relative" },
@@ -342,21 +377,21 @@ else {
342
377
  [isLib,];
343
378
  /** @type {[typeof Calling, ]} */ ;
344
379
  // @ts-ignore
345
- const __VLS_27 = __VLS_asFunctionalComponent(Calling, new Calling({
380
+ const __VLS_31 = __VLS_asFunctionalComponent(Calling, new Calling({
346
381
  ...{ 'onUserCalling': {} },
347
382
  ...{ 'onEndCall': {} },
348
383
  ref: "callingRef",
349
384
  responsive: (__VLS_ctx.responsiveRender),
350
385
  }));
351
- const __VLS_28 = __VLS_27({
386
+ const __VLS_32 = __VLS_31({
352
387
  ...{ 'onUserCalling': {} },
353
388
  ...{ 'onEndCall': {} },
354
389
  ref: "callingRef",
355
390
  responsive: (__VLS_ctx.responsiveRender),
356
- }, ...__VLS_functionalComponentArgsRest(__VLS_27));
357
- let __VLS_30;
358
- let __VLS_31;
359
- const __VLS_32 = ({ userCalling: {} },
391
+ }, ...__VLS_functionalComponentArgsRest(__VLS_31));
392
+ let __VLS_34;
393
+ let __VLS_35;
394
+ const __VLS_36 = ({ userCalling: {} },
360
395
  { onUserCalling: (...[$event]) => {
361
396
  if (!!(!__VLS_ctx.isRouterReady))
362
397
  return;
@@ -374,7 +409,7 @@ else {
374
409
  // @ts-ignore
375
410
  [responsiveRender, emit,];
376
411
  } });
377
- const __VLS_33 = ({ endCall: {} },
412
+ const __VLS_37 = ({ endCall: {} },
378
413
  { onEndCall: (...[$event]) => {
379
414
  if (!!(!__VLS_ctx.isRouterReady))
380
415
  return;
@@ -393,10 +428,10 @@ else {
393
428
  [emit,];
394
429
  } });
395
430
  /** @type {typeof __VLS_ctx.callingRef} */ ;
396
- var __VLS_34 = {};
431
+ var __VLS_38 = {};
397
432
  // @ts-ignore
398
433
  [callingRef,];
399
- var __VLS_29;
434
+ var __VLS_33;
400
435
  }
401
436
  if (__VLS_ctx.responsiveRender == 'mobile') {
402
437
  // @ts-ignore
@@ -440,8 +475,8 @@ else {
440
475
  });
441
476
  /** @type {[typeof IconArrowLeft, ]} */ ;
442
477
  // @ts-ignore
443
- const __VLS_37 = __VLS_asFunctionalComponent(IconArrowLeft, new IconArrowLeft({}));
444
- const __VLS_38 = __VLS_37({}, ...__VLS_functionalComponentArgsRest(__VLS_37));
478
+ const __VLS_41 = __VLS_asFunctionalComponent(IconArrowLeft, new IconArrowLeft({}));
479
+ const __VLS_42 = __VLS_41({}, ...__VLS_functionalComponentArgsRest(__VLS_41));
445
480
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
446
481
  ...{ class: "ml-3" },
447
482
  });
@@ -513,15 +548,15 @@ else {
513
548
  });
514
549
  /** @type {[typeof IconCloseCircle, ]} */ ;
515
550
  // @ts-ignore
516
- const __VLS_41 = __VLS_asFunctionalComponent(IconCloseCircle, new IconCloseCircle({}));
517
- const __VLS_42 = __VLS_41({}, ...__VLS_functionalComponentArgsRest(__VLS_41));
551
+ const __VLS_45 = __VLS_asFunctionalComponent(IconCloseCircle, new IconCloseCircle({}));
552
+ const __VLS_46 = __VLS_45({}, ...__VLS_functionalComponentArgsRest(__VLS_45));
518
553
  }
519
554
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
520
555
  ...{ class: "grow overflow-hidden" },
521
556
  });
522
557
  /** @type {[typeof ChatList, ]} */ ;
523
558
  // @ts-ignore
524
- const __VLS_45 = __VLS_asFunctionalComponent(ChatList, new ChatList({
559
+ const __VLS_49 = __VLS_asFunctionalComponent(ChatList, new ChatList({
525
560
  ...{ 'onSelectReceiver': {} },
526
561
  ...{ 'onOpenPhoneNumpad': {} },
527
562
  ref: "chatListRef",
@@ -529,19 +564,19 @@ else {
529
564
  responsive: (__VLS_ctx.responsiveRender),
530
565
  receiverId: (__VLS_ctx.receiverId),
531
566
  }));
532
- const __VLS_46 = __VLS_45({
567
+ const __VLS_50 = __VLS_49({
533
568
  ...{ 'onSelectReceiver': {} },
534
569
  ...{ 'onOpenPhoneNumpad': {} },
535
570
  ref: "chatListRef",
536
571
  ...{ class: "w-full max-w-[500px] !bg-[#F9FAFC]" },
537
572
  responsive: (__VLS_ctx.responsiveRender),
538
573
  receiverId: (__VLS_ctx.receiverId),
539
- }, ...__VLS_functionalComponentArgsRest(__VLS_45));
540
- let __VLS_48;
541
- let __VLS_49;
542
- const __VLS_50 = ({ selectReceiver: {} },
574
+ }, ...__VLS_functionalComponentArgsRest(__VLS_49));
575
+ let __VLS_52;
576
+ let __VLS_53;
577
+ const __VLS_54 = ({ selectReceiver: {} },
543
578
  { onSelectReceiver: (__VLS_ctx.selectReceiver) });
544
- const __VLS_51 = ({ openPhoneNumpad: {} },
579
+ const __VLS_55 = ({ openPhoneNumpad: {} },
545
580
  { onOpenPhoneNumpad: (...[$event]) => {
546
581
  if (!!(!__VLS_ctx.isRouterReady))
547
582
  return;
@@ -561,13 +596,13 @@ else {
561
596
  } });
562
597
  __VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CHAT_LIST) }, null, null);
563
598
  /** @type {typeof __VLS_ctx.chatListRef} */ ;
564
- var __VLS_52 = {};
599
+ var __VLS_56 = {};
565
600
  // @ts-ignore
566
601
  [currentPage, PAGE, chatListRef,];
567
- var __VLS_47;
602
+ var __VLS_51;
568
603
  /** @type {[typeof HomeComponent, ]} */ ;
569
604
  // @ts-ignore
570
- const __VLS_55 = __VLS_asFunctionalComponent(HomeComponent, new HomeComponent({
605
+ const __VLS_59 = __VLS_asFunctionalComponent(HomeComponent, new HomeComponent({
571
606
  ...{ 'onCall': {} },
572
607
  ...{ 'onBack': {} },
573
608
  ...{ 'onInputFocus': {} },
@@ -577,7 +612,7 @@ else {
577
612
  conversation: (__VLS_ctx.currentConversation),
578
613
  responsive: (__VLS_ctx.responsiveRender),
579
614
  }));
580
- const __VLS_56 = __VLS_55({
615
+ const __VLS_60 = __VLS_59({
581
616
  ...{ 'onCall': {} },
582
617
  ...{ 'onBack': {} },
583
618
  ...{ 'onInputFocus': {} },
@@ -586,12 +621,12 @@ else {
586
621
  ...{ class: "h-full" },
587
622
  conversation: (__VLS_ctx.currentConversation),
588
623
  responsive: (__VLS_ctx.responsiveRender),
589
- }, ...__VLS_functionalComponentArgsRest(__VLS_55));
590
- let __VLS_58;
591
- let __VLS_59;
592
- const __VLS_60 = ({ call: {} },
624
+ }, ...__VLS_functionalComponentArgsRest(__VLS_59));
625
+ let __VLS_62;
626
+ let __VLS_63;
627
+ const __VLS_64 = ({ call: {} },
593
628
  { onCall: (__VLS_ctx.handleCall) });
594
- const __VLS_61 = ({ back: {} },
629
+ const __VLS_65 = ({ back: {} },
595
630
  { onBack: (...[$event]) => {
596
631
  if (!!(!__VLS_ctx.isRouterReady))
597
632
  return;
@@ -609,60 +644,60 @@ else {
609
644
  // @ts-ignore
610
645
  [responsiveRender, currentPageConfig, receiverId, currentConversation, handleCall,];
611
646
  } });
612
- const __VLS_62 = ({ inputFocus: {} },
647
+ const __VLS_66 = ({ inputFocus: {} },
613
648
  { onInputFocus: (__VLS_ctx.handleReadMessage) });
614
649
  __VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.currentPage == __VLS_ctx.PAGE.HOME) }, null, null);
615
650
  /** @type {typeof __VLS_ctx.homeComponentRef} */ ;
616
- var __VLS_63 = {};
651
+ var __VLS_67 = {};
617
652
  // @ts-ignore
618
653
  [currentPage, PAGE, handleReadMessage, homeComponentRef,];
619
- var __VLS_57;
654
+ var __VLS_61;
620
655
  if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_DETAIL) {
621
656
  // @ts-ignore
622
657
  [currentPage, PAGE,];
623
658
  /** @type {[typeof CustomerDetail, ]} */ ;
624
659
  // @ts-ignore
625
- const __VLS_66 = __VLS_asFunctionalComponent(CustomerDetail, new CustomerDetail({
660
+ const __VLS_70 = __VLS_asFunctionalComponent(CustomerDetail, new CustomerDetail({
626
661
  ref: "customerDetailRef",
627
662
  receiverId: (__VLS_ctx.receiverId),
628
663
  ...{ class: "w-full h-full" },
629
664
  responsive: (__VLS_ctx.responsiveRender),
630
665
  }));
631
- const __VLS_67 = __VLS_66({
666
+ const __VLS_71 = __VLS_70({
632
667
  ref: "customerDetailRef",
633
668
  receiverId: (__VLS_ctx.receiverId),
634
669
  ...{ class: "w-full h-full" },
635
670
  responsive: (__VLS_ctx.responsiveRender),
636
- }, ...__VLS_functionalComponentArgsRest(__VLS_66));
671
+ }, ...__VLS_functionalComponentArgsRest(__VLS_70));
637
672
  /** @type {typeof __VLS_ctx.customerDetailRef} */ ;
638
- var __VLS_69 = {};
673
+ var __VLS_73 = {};
639
674
  // @ts-ignore
640
675
  [responsiveRender, receiverId, customerDetailRef,];
641
- var __VLS_68;
676
+ var __VLS_72;
642
677
  }
643
678
  if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_CHECK_IN) {
644
679
  // @ts-ignore
645
680
  [currentPage, PAGE,];
646
681
  /** @type {[typeof CustomerCheckIn, ]} */ ;
647
682
  // @ts-ignore
648
- const __VLS_72 = __VLS_asFunctionalComponent(CustomerCheckIn, new CustomerCheckIn({
683
+ const __VLS_76 = __VLS_asFunctionalComponent(CustomerCheckIn, new CustomerCheckIn({
649
684
  ...{ class: "w-full h-full" },
650
685
  }));
651
- const __VLS_73 = __VLS_72({
686
+ const __VLS_77 = __VLS_76({
652
687
  ...{ class: "w-full h-full" },
653
- }, ...__VLS_functionalComponentArgsRest(__VLS_72));
688
+ }, ...__VLS_functionalComponentArgsRest(__VLS_76));
654
689
  }
655
690
  if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_APPOINTMENT) {
656
691
  // @ts-ignore
657
692
  [currentPage, PAGE,];
658
693
  /** @type {[typeof CustomerAppointment, ]} */ ;
659
694
  // @ts-ignore
660
- const __VLS_76 = __VLS_asFunctionalComponent(CustomerAppointment, new CustomerAppointment({
695
+ const __VLS_80 = __VLS_asFunctionalComponent(CustomerAppointment, new CustomerAppointment({
661
696
  ...{ class: "w-full h-full" },
662
697
  }));
663
- const __VLS_77 = __VLS_76({
698
+ const __VLS_81 = __VLS_80({
664
699
  ...{ class: "w-full h-full" },
665
- }, ...__VLS_functionalComponentArgsRest(__VLS_76));
700
+ }, ...__VLS_functionalComponentArgsRest(__VLS_80));
666
701
  }
667
702
  }
668
703
  else {
@@ -671,7 +706,7 @@ else {
671
706
  });
672
707
  /** @type {[typeof ChatList, ]} */ ;
673
708
  // @ts-ignore
674
- const __VLS_80 = __VLS_asFunctionalComponent(ChatList, new ChatList({
709
+ const __VLS_84 = __VLS_asFunctionalComponent(ChatList, new ChatList({
675
710
  ...{ 'onSelectReceiver': {} },
676
711
  ...{ 'onOpenPhoneNumpad': {} },
677
712
  ref: "chatListRef",
@@ -679,19 +714,19 @@ else {
679
714
  responsive: (__VLS_ctx.responsiveRender),
680
715
  receiverId: (__VLS_ctx.receiverId),
681
716
  }));
682
- const __VLS_81 = __VLS_80({
717
+ const __VLS_85 = __VLS_84({
683
718
  ...{ 'onSelectReceiver': {} },
684
719
  ...{ 'onOpenPhoneNumpad': {} },
685
720
  ref: "chatListRef",
686
721
  ...{ class: "w-[38%] max-w-[500px] min-w-[300px] xl:min-w-[450px] border-r layout-border" },
687
722
  responsive: (__VLS_ctx.responsiveRender),
688
723
  receiverId: (__VLS_ctx.receiverId),
689
- }, ...__VLS_functionalComponentArgsRest(__VLS_80));
690
- let __VLS_83;
691
- let __VLS_84;
692
- const __VLS_85 = ({ selectReceiver: {} },
724
+ }, ...__VLS_functionalComponentArgsRest(__VLS_84));
725
+ let __VLS_87;
726
+ let __VLS_88;
727
+ const __VLS_89 = ({ selectReceiver: {} },
693
728
  { onSelectReceiver: (__VLS_ctx.selectReceiver) });
694
- const __VLS_86 = ({ openPhoneNumpad: {} },
729
+ const __VLS_90 = ({ openPhoneNumpad: {} },
695
730
  { onOpenPhoneNumpad: (...[$event]) => {
696
731
  if (!!(!__VLS_ctx.isRouterReady))
697
732
  return;
@@ -710,10 +745,10 @@ else {
710
745
  [responsiveRender, receiverId, selectReceiver, handleOpenPhoneNumpad,];
711
746
  } });
712
747
  /** @type {typeof __VLS_ctx.chatListRef} */ ;
713
- var __VLS_87 = {};
748
+ var __VLS_91 = {};
714
749
  // @ts-ignore
715
750
  [chatListRef,];
716
- var __VLS_82;
751
+ var __VLS_86;
717
752
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
718
753
  ...{ class: "bg-white grow flex flex-col h-full overflow-hidden" },
719
754
  });
@@ -747,8 +782,8 @@ else {
747
782
  });
748
783
  /** @type {[typeof IconArrowLeft, ]} */ ;
749
784
  // @ts-ignore
750
- const __VLS_90 = __VLS_asFunctionalComponent(IconArrowLeft, new IconArrowLeft({}));
751
- const __VLS_91 = __VLS_90({}, ...__VLS_functionalComponentArgsRest(__VLS_90));
785
+ const __VLS_94 = __VLS_asFunctionalComponent(IconArrowLeft, new IconArrowLeft({}));
786
+ const __VLS_95 = __VLS_94({}, ...__VLS_functionalComponentArgsRest(__VLS_94));
752
787
  __VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
753
788
  ...{ class: "text-xl font-semibold text-chat-haze-900 ml-3" },
754
789
  });
@@ -761,7 +796,7 @@ else {
761
796
  });
762
797
  /** @type {[typeof HomeComponent, ]} */ ;
763
798
  // @ts-ignore
764
- const __VLS_94 = __VLS_asFunctionalComponent(HomeComponent, new HomeComponent({
799
+ const __VLS_98 = __VLS_asFunctionalComponent(HomeComponent, new HomeComponent({
765
800
  ...{ 'onCall': {} },
766
801
  ...{ 'onInputFocus': {} },
767
802
  ref: "homeComponentRef",
@@ -770,7 +805,7 @@ else {
770
805
  responsive: (__VLS_ctx.responsiveRender),
771
806
  conversation: (__VLS_ctx.currentConversation),
772
807
  }));
773
- const __VLS_95 = __VLS_94({
808
+ const __VLS_99 = __VLS_98({
774
809
  ...{ 'onCall': {} },
775
810
  ...{ 'onInputFocus': {} },
776
811
  ref: "homeComponentRef",
@@ -778,92 +813,92 @@ else {
778
813
  ...{ class: "h-full" },
779
814
  responsive: (__VLS_ctx.responsiveRender),
780
815
  conversation: (__VLS_ctx.currentConversation),
781
- }, ...__VLS_functionalComponentArgsRest(__VLS_94));
782
- let __VLS_97;
783
- let __VLS_98;
784
- const __VLS_99 = ({ call: {} },
816
+ }, ...__VLS_functionalComponentArgsRest(__VLS_98));
817
+ let __VLS_101;
818
+ let __VLS_102;
819
+ const __VLS_103 = ({ call: {} },
785
820
  { onCall: (__VLS_ctx.handleCall) });
786
- const __VLS_100 = ({ inputFocus: {} },
821
+ const __VLS_104 = ({ inputFocus: {} },
787
822
  { onInputFocus: (__VLS_ctx.handleReadMessage) });
788
823
  __VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.currentPage == __VLS_ctx.PAGE.HOME && __VLS_ctx.receiverId) }, null, null);
789
824
  /** @type {typeof __VLS_ctx.homeComponentRef} */ ;
790
- var __VLS_101 = {};
825
+ var __VLS_105 = {};
791
826
  // @ts-ignore
792
827
  [currentPage, PAGE, responsiveRender, receiverId, receiverId, currentConversation, handleCall, handleReadMessage, homeComponentRef,];
793
- var __VLS_96;
828
+ var __VLS_100;
794
829
  if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_DETAIL) {
795
830
  // @ts-ignore
796
831
  [currentPage, PAGE,];
797
832
  /** @type {[typeof CustomerDetail, ]} */ ;
798
833
  // @ts-ignore
799
- const __VLS_104 = __VLS_asFunctionalComponent(CustomerDetail, new CustomerDetail({
834
+ const __VLS_108 = __VLS_asFunctionalComponent(CustomerDetail, new CustomerDetail({
800
835
  ref: "customerDetailRef",
801
836
  receiverId: (__VLS_ctx.receiverId),
802
837
  ...{ class: "h-full" },
803
838
  responsive: (__VLS_ctx.responsiveRender),
804
839
  }));
805
- const __VLS_105 = __VLS_104({
840
+ const __VLS_109 = __VLS_108({
806
841
  ref: "customerDetailRef",
807
842
  receiverId: (__VLS_ctx.receiverId),
808
843
  ...{ class: "h-full" },
809
844
  responsive: (__VLS_ctx.responsiveRender),
810
- }, ...__VLS_functionalComponentArgsRest(__VLS_104));
845
+ }, ...__VLS_functionalComponentArgsRest(__VLS_108));
811
846
  /** @type {typeof __VLS_ctx.customerDetailRef} */ ;
812
- var __VLS_107 = {};
847
+ var __VLS_111 = {};
813
848
  // @ts-ignore
814
849
  [responsiveRender, receiverId, customerDetailRef,];
815
- var __VLS_106;
850
+ var __VLS_110;
816
851
  }
817
852
  if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_CHECK_IN) {
818
853
  // @ts-ignore
819
854
  [currentPage, PAGE,];
820
855
  /** @type {[typeof CustomerCheckIn, ]} */ ;
821
856
  // @ts-ignore
822
- const __VLS_110 = __VLS_asFunctionalComponent(CustomerCheckIn, new CustomerCheckIn({
857
+ const __VLS_114 = __VLS_asFunctionalComponent(CustomerCheckIn, new CustomerCheckIn({
823
858
  ...{ class: "h-full" },
824
859
  }));
825
- const __VLS_111 = __VLS_110({
860
+ const __VLS_115 = __VLS_114({
826
861
  ...{ class: "h-full" },
827
- }, ...__VLS_functionalComponentArgsRest(__VLS_110));
862
+ }, ...__VLS_functionalComponentArgsRest(__VLS_114));
828
863
  }
829
864
  if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_APPOINTMENT) {
830
865
  // @ts-ignore
831
866
  [currentPage, PAGE,];
832
867
  /** @type {[typeof CustomerAppointment, ]} */ ;
833
868
  // @ts-ignore
834
- const __VLS_114 = __VLS_asFunctionalComponent(CustomerAppointment, new CustomerAppointment({
869
+ const __VLS_118 = __VLS_asFunctionalComponent(CustomerAppointment, new CustomerAppointment({
835
870
  ...{ class: "h-full" },
836
871
  }));
837
- const __VLS_115 = __VLS_114({
872
+ const __VLS_119 = __VLS_118({
838
873
  ...{ class: "h-full" },
839
- }, ...__VLS_functionalComponentArgsRest(__VLS_114));
874
+ }, ...__VLS_functionalComponentArgsRest(__VLS_118));
840
875
  }
841
876
  }
842
877
  /** @type {[typeof PhoneNumpad, ]} */ ;
843
878
  // @ts-ignore
844
- const __VLS_118 = __VLS_asFunctionalComponent(PhoneNumpad, new PhoneNumpad({
879
+ const __VLS_122 = __VLS_asFunctionalComponent(PhoneNumpad, new PhoneNumpad({
845
880
  ...{ 'onCall': {} },
846
881
  ref: "phoneNumpadRef",
847
882
  hideNumpad: (__VLS_ctx.isLib),
848
883
  responsive: (__VLS_ctx.responsiveRender),
849
884
  ...{ class: "bg-white shrink-0 border-l layout-border" },
850
885
  }));
851
- const __VLS_119 = __VLS_118({
886
+ const __VLS_123 = __VLS_122({
852
887
  ...{ 'onCall': {} },
853
888
  ref: "phoneNumpadRef",
854
889
  hideNumpad: (__VLS_ctx.isLib),
855
890
  responsive: (__VLS_ctx.responsiveRender),
856
891
  ...{ class: "bg-white shrink-0 border-l layout-border" },
857
- }, ...__VLS_functionalComponentArgsRest(__VLS_118));
858
- let __VLS_121;
859
- let __VLS_122;
860
- const __VLS_123 = ({ call: {} },
892
+ }, ...__VLS_functionalComponentArgsRest(__VLS_122));
893
+ let __VLS_125;
894
+ let __VLS_126;
895
+ const __VLS_127 = ({ call: {} },
861
896
  { onCall: (__VLS_ctx.handleCall) });
862
897
  /** @type {typeof __VLS_ctx.phoneNumpadRef} */ ;
863
- var __VLS_124 = {};
898
+ var __VLS_128 = {};
864
899
  // @ts-ignore
865
900
  [isLib, responsiveRender, handleCall, phoneNumpadRef,];
866
- var __VLS_120;
901
+ var __VLS_124;
867
902
  }
868
903
  /** @type {__VLS_StyleScopedClasses['go-chat-main']} */ ;
869
904
  /** @type {__VLS_StyleScopedClasses['max-w-full']} */ ;
@@ -872,8 +907,19 @@ else {
872
907
  /** @type {__VLS_StyleScopedClasses['flex-center']} */ ;
873
908
  /** @type {__VLS_StyleScopedClasses['sc-full']} */ ;
874
909
  /** @type {__VLS_StyleScopedClasses['mt-10']} */ ;
910
+ /** @type {__VLS_StyleScopedClasses['h-full']} */ ;
911
+ /** @type {__VLS_StyleScopedClasses['p-5']} */ ;
912
+ /** @type {__VLS_StyleScopedClasses['flex']} */ ;
913
+ /** @type {__VLS_StyleScopedClasses['flex-col']} */ ;
914
+ /** @type {__VLS_StyleScopedClasses['shrink-0']} */ ;
915
+ /** @type {__VLS_StyleScopedClasses['flex']} */ ;
916
+ /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
917
+ /** @type {__VLS_StyleScopedClasses['justify-between']} */ ;
918
+ /** @type {__VLS_StyleScopedClasses['w-10']} */ ;
919
+ /** @type {__VLS_StyleScopedClasses['h-10']} */ ;
875
920
  /** @type {__VLS_StyleScopedClasses['bg-white']} */ ;
876
921
  /** @type {__VLS_StyleScopedClasses['grow']} */ ;
922
+ /** @type {__VLS_StyleScopedClasses['grow']} */ ;
877
923
  /** @type {__VLS_StyleScopedClasses['h-full']} */ ;
878
924
  /** @type {__VLS_StyleScopedClasses['overflow-hidden']} */ ;
879
925
  /** @type {__VLS_StyleScopedClasses['flex']} */ ;
@@ -966,7 +1012,7 @@ else {
966
1012
  /** @type {__VLS_StyleScopedClasses['border-l']} */ ;
967
1013
  /** @type {__VLS_StyleScopedClasses['layout-border']} */ ;
968
1014
  // @ts-ignore
969
- var __VLS_35 = __VLS_34, __VLS_53 = __VLS_52, __VLS_64 = __VLS_63, __VLS_70 = __VLS_69, __VLS_88 = __VLS_87, __VLS_102 = __VLS_101, __VLS_108 = __VLS_107, __VLS_125 = __VLS_124;
1015
+ var __VLS_39 = __VLS_38, __VLS_57 = __VLS_56, __VLS_68 = __VLS_67, __VLS_74 = __VLS_73, __VLS_92 = __VLS_91, __VLS_106 = __VLS_105, __VLS_112 = __VLS_111, __VLS_129 = __VLS_128;
970
1016
  const __VLS_export = (await import('vue')).defineComponent({
971
1017
  setup: () => (__VLS_exposed),
972
1018
  __typeEmits: {},
@@ -46,7 +46,7 @@ const handlePlivoCallBack = (status, data) => {
46
46
  handleMedialPermissionError();
47
47
  }
48
48
  };
49
- const { plivoLogin, plivoCallAnswer, plivoCall, plivoEndCall, plivoCallSwishMute, plivoCallSwishSpeaker, plivoRemoveCallBack, checkTimeLimit, isPlivoOn } = usePlivo(handlePlivoCallBack);
49
+ const { plivoLogin, plivoCallAnswer, plivoCall, plivoEndCall, plivoCallSwishMute, plivoCallSwishSpeaker, plivoRemoveCallBack, checkTimeLimit, isPlivoOn, isPlivoOn2 } = usePlivo(handlePlivoCallBack);
50
50
  const STATUS_LABEL = computed(() => {
51
51
  return {
52
52
  [PLIVO_CALL_STATUS.CONNECTING]: 'Connecting...',
@@ -94,17 +94,17 @@ onMounted(async () => {
94
94
  }
95
95
  });
96
96
  onBeforeUnmount(() => {
97
- console.log('ssssssssssssssssssssssss');
97
+ console.log('aaaaaaaaaaaaaaaaaaaaaaaa');
98
98
  plivoRemoveCallBack();
99
99
  });
100
100
  onUnmounted(() => {
101
- console.log('ssssssssssssssssssssssss');
102
101
  if (timer)
103
102
  clearInterval(timer);
104
103
  if (timeOut)
105
104
  clearTimeout(timeOut);
106
105
  endCall();
107
- // plivoRemoveCallBack()
106
+ console.log('aaaaaaaaaaaaaaaaaaaaaaaa');
107
+ plivoRemoveCallBack();
108
108
  errorMessage.value = '';
109
109
  });
110
110
  let dataWebSK = null;
@@ -247,7 +247,9 @@ const getUserOffer = async (phone) => {
247
247
  }
248
248
  };
249
249
  const handleTimeLimitError = () => {
250
- if (!isPlivoOn.value)
250
+ console.log(isPlivoOn.value, 'isPlivoOn.value isPlivoOn.value');
251
+ console.log(isPlivoOn2, 'isPlivoOn2');
252
+ if (!isPlivoOn2)
251
253
  return;
252
254
  errorMessage.value = 'Call time limit reached. This call has ended.';
253
255
  endCall();
@@ -13,4 +13,5 @@ export declare function usePlivo(callback: (status: PlivoCallStatusType, data?:
13
13
  plivoRemoveCallBack: () => void;
14
14
  checkTimeLimit: () => Promise<number>;
15
15
  isPlivoOn: import("vue").Ref<boolean, boolean>;
16
+ isPlivoOn2: boolean;
16
17
  };
@@ -17,6 +17,7 @@ export function usePlivo(callback) {
17
17
  let custom_resolve = null;
18
18
  let custom_reject = null;
19
19
  const isPlivoOn = ref(false);
20
+ let isPlivoOn2 = false;
20
21
  const plivoLogin = async (data) => {
21
22
  try {
22
23
  if (!plivoBrowserSdk) {
@@ -44,6 +45,7 @@ export function usePlivo(callback) {
44
45
  await plivoBrowserSdk?.client?.loginWithAccessToken(data.token);
45
46
  plivoBrowserSdk?.client?.setRingTone(false);
46
47
  isPlivoOn.value = true;
48
+ isPlivoOn2 = true;
47
49
  // await plivoBrowserSdk?.client?.on?.(payload)
48
50
  // console.log('Registered with token')
49
51
  console.log(plivoBrowserSdk);
@@ -184,6 +186,7 @@ export function usePlivo(callback) {
184
186
  plivoBrowserSdk?.client?.off?.('onLoginFailed', handleLoginFailed);
185
187
  plivoBrowserSdk = null;
186
188
  isPlivoOn.value = false;
189
+ isPlivoOn2 = false;
187
190
  };
188
191
  const sleep = () => {
189
192
  return new Promise((resolve) => setTimeout(resolve, 2000));
@@ -198,6 +201,7 @@ export function usePlivo(callback) {
198
201
  plivoCallSwishSpeaker,
199
202
  plivoRemoveCallBack,
200
203
  checkTimeLimit,
201
- isPlivoOn
204
+ isPlivoOn,
205
+ isPlivoOn2
202
206
  };
203
207
  }