@phonghq/go-chat 1.0.34 → 1.0.35

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.
@@ -121,6 +121,8 @@ const customerDetailRef = ref(null);
121
121
  const homeComponentRef = ref(null);
122
122
  const chatListRef = ref(null);
123
123
  const drawerVisibleRef = ref(null);
124
+ const mediaPermissionError = ref('');
125
+ const mediaPermissionState = ref('granted');
124
126
  const selectReceiver = async (data) => {
125
127
  if (receiverId.value != data?.receiver_id || responsiveRender.value === 'mobile') {
126
128
  if (currentPage.value != PAGE.HOME) {
@@ -185,6 +187,34 @@ const openSettings = () => {
185
187
  const handleReadMessage = () => {
186
188
  chatListRef.value?.handleReadMessage();
187
189
  };
190
+ const handleMedialPermissionError = async () => {
191
+ if (navigator.permissions && navigator.permissions.query) {
192
+ try {
193
+ const result = await navigator.permissions.query({ name: 'microphone' });
194
+ if (result.state == 'prompt') {
195
+ mediaPermissionError.value =
196
+ 'Microphone access is needed. Please allow microphone permission to continue.';
197
+ }
198
+ else if (result.state == 'denied') {
199
+ mediaPermissionError.value =
200
+ 'You have denied microphone access. Please enable microphone permission in your browser to continue the call.';
201
+ }
202
+ mediaPermissionState.value = result.state;
203
+ }
204
+ catch (err) {
205
+ console.log(err);
206
+ }
207
+ }
208
+ };
209
+ const askMedialPermission = async () => {
210
+ try {
211
+ await navigator.mediaDevices.getUserMedia({ audio: true });
212
+ window.location.reload();
213
+ }
214
+ catch (e) {
215
+ console.log(e);
216
+ }
217
+ };
188
218
  let __VLS_exposed;
189
219
  defineExpose({
190
220
  get unreadCount() {
@@ -263,23 +293,44 @@ else if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_SUCCESS) {
263
293
  const __VLS_12 = __VLS_asFunctionalComponent(SettingSuccess, new SettingSuccess({}));
264
294
  const __VLS_13 = __VLS_12({}, ...__VLS_functionalComponentArgsRest(__VLS_12));
265
295
  }
266
- else if (__VLS_ctx.responsiveRender == 'mobile') {
267
- // @ts-ignore
268
- [responsiveRender,];
296
+ else {
269
297
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
270
- ...{ class: "relative flex flex-col mx-auto w-full h-full bg-[#F9FAFC] overflow-hidden chat-mobile pt-4" },
298
+ ...{ class: "w-full h-full overflow-hidden relative" },
271
299
  });
300
+ if (__VLS_ctx.mediaPermissionError) {
301
+ // @ts-ignore
302
+ [mediaPermissionError,];
303
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
304
+ ...{ class: "w-full bg-chat-error text-white text-sm px-4 py-2 flex items-center gap-2" },
305
+ });
306
+ __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({});
307
+ (__VLS_ctx.mediaPermissionError);
308
+ // @ts-ignore
309
+ [mediaPermissionError,];
310
+ if (__VLS_ctx.mediaPermissionState == 'prompt') {
311
+ // @ts-ignore
312
+ [mediaPermissionState,];
313
+ __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
314
+ ...{ onClick: (__VLS_ctx.askMedialPermission) },
315
+ ...{ class: "bg-white text-chat-haze-600 font-bold w-[250px] rounded-lg" },
316
+ });
317
+ // @ts-ignore
318
+ [askMedialPermission,];
319
+ }
320
+ }
272
321
  /** @type {[typeof Calling, ]} */ ;
273
322
  // @ts-ignore
274
323
  const __VLS_16 = __VLS_asFunctionalComponent(Calling, new Calling({
275
324
  ...{ 'onUserCalling': {} },
276
325
  ...{ 'onEndCall': {} },
326
+ ...{ 'onError:mediaPermissionFail': {} },
277
327
  ref: "callingRef",
278
328
  responsive: (__VLS_ctx.responsiveRender),
279
329
  }));
280
330
  const __VLS_17 = __VLS_16({
281
331
  ...{ 'onUserCalling': {} },
282
332
  ...{ 'onEndCall': {} },
333
+ ...{ 'onError:mediaPermissionFail': {} },
283
334
  ref: "callingRef",
284
335
  responsive: (__VLS_ctx.responsiveRender),
285
336
  }, ...__VLS_functionalComponentArgsRest(__VLS_16));
@@ -295,59 +346,34 @@ else if (__VLS_ctx.responsiveRender == 'mobile') {
295
346
  return;
296
347
  if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_SUCCESS))
297
348
  return;
298
- if (!(__VLS_ctx.responsiveRender == 'mobile'))
299
- return;
300
349
  __VLS_ctx.emit('userCalling', $event);
301
350
  // @ts-ignore
302
351
  [responsiveRender, emit,];
303
352
  } });
304
353
  const __VLS_22 = ({ endCall: {} },
305
354
  { onEndCall: (__VLS_ctx.handleEndCall) });
355
+ const __VLS_23 = ({ 'error:mediaPermissionFail': {} },
356
+ { 'onError:mediaPermissionFail': (__VLS_ctx.handleMedialPermissionError) });
306
357
  /** @type {typeof __VLS_ctx.callingRef} */ ;
307
- var __VLS_23 = {};
358
+ var __VLS_24 = {};
308
359
  // @ts-ignore
309
- [handleEndCall, callingRef,];
360
+ [handleEndCall, handleMedialPermissionError, callingRef,];
310
361
  var __VLS_18;
311
- if (__VLS_ctx.currentPageConfig?.backFunc && !__VLS_ctx.currentPageConfig.isHidden) {
362
+ if (__VLS_ctx.responsiveRender == 'mobile') {
312
363
  // @ts-ignore
313
- [currentPageConfig, currentPageConfig,];
314
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
315
- ...{ class: "text-[#141B34] px-6 shrink-0" },
316
- });
364
+ [responsiveRender,];
317
365
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
318
- ...{ class: "flex items-center justify-between" },
319
- });
320
- __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
321
- ...{ onClick: (...[$event]) => {
322
- if (!!(!__VLS_ctx.isRouterReady))
323
- return;
324
- if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.TENANT_ERROR))
325
- return;
326
- if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_TENANT))
327
- return;
328
- if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_SUCCESS))
329
- return;
330
- if (!(__VLS_ctx.responsiveRender == 'mobile'))
331
- return;
332
- if (!(__VLS_ctx.currentPageConfig?.backFunc && !__VLS_ctx.currentPageConfig.isHidden))
333
- return;
334
- __VLS_ctx.currentPageConfig.backFunc();
335
- // @ts-ignore
336
- [currentPageConfig,];
337
- } },
338
- ...{ class: "flex items-center" },
339
- });
340
- /** @type {[typeof IconArrowLeft, ]} */ ;
341
- // @ts-ignore
342
- const __VLS_26 = __VLS_asFunctionalComponent(IconArrowLeft, new IconArrowLeft({}));
343
- const __VLS_27 = __VLS_26({}, ...__VLS_functionalComponentArgsRest(__VLS_26));
344
- __VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
345
- ...{ class: "text-xl font-semibold text-chat-haze-900 ml-3" },
366
+ ...{ class: "relative flex flex-col mx-auto w-full h-full bg-[#F9FAFC] overflow-hidden chat-mobile pt-4" },
346
367
  });
347
- (__VLS_ctx.currentPageConfig.backTitle ?? '');
348
- // @ts-ignore
349
- [currentPageConfig,];
350
- if (props.isLib) {
368
+ if (__VLS_ctx.currentPageConfig?.backFunc && !__VLS_ctx.currentPageConfig.isHidden) {
369
+ // @ts-ignore
370
+ [currentPageConfig, currentPageConfig,];
371
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
372
+ ...{ class: "text-[#141B34] px-6 shrink-0" },
373
+ });
374
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
375
+ ...{ class: "flex items-center justify-between" },
376
+ });
351
377
  __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
352
378
  ...{ onClick: (...[$event]) => {
353
379
  if (!!(!__VLS_ctx.isRouterReady))
@@ -362,197 +388,106 @@ else if (__VLS_ctx.responsiveRender == 'mobile') {
362
388
  return;
363
389
  if (!(__VLS_ctx.currentPageConfig?.backFunc && !__VLS_ctx.currentPageConfig.isHidden))
364
390
  return;
365
- if (!(props.isLib))
366
- return;
367
- __VLS_ctx.emit('close');
391
+ __VLS_ctx.currentPageConfig.backFunc();
368
392
  // @ts-ignore
369
- [emit,];
393
+ [currentPageConfig,];
370
394
  } },
371
- ...{ class: "w-10 h-10" },
395
+ ...{ class: "flex items-center" },
372
396
  });
373
- /** @type {[typeof IconCloseCircle, ]} */ ;
397
+ /** @type {[typeof IconArrowLeft, ]} */ ;
374
398
  // @ts-ignore
375
- const __VLS_30 = __VLS_asFunctionalComponent(IconCloseCircle, new IconCloseCircle({}));
376
- const __VLS_31 = __VLS_30({}, ...__VLS_functionalComponentArgsRest(__VLS_30));
377
- }
378
- }
379
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
380
- ...{ class: "grow overflow-hidden" },
381
- });
382
- /** @type {[typeof ChatList, ]} */ ;
383
- // @ts-ignore
384
- const __VLS_34 = __VLS_asFunctionalComponent(ChatList, new ChatList({
385
- ...{ 'onSelectReceiver': {} },
386
- ref: "chatListRef",
387
- ...{ class: "w-full max-w-[500px] !bg-[#F9FAFC]" },
388
- responsive: (__VLS_ctx.responsiveRender),
389
- receiverId: (__VLS_ctx.receiverId),
390
- }));
391
- const __VLS_35 = __VLS_34({
392
- ...{ 'onSelectReceiver': {} },
393
- ref: "chatListRef",
394
- ...{ class: "w-full max-w-[500px] !bg-[#F9FAFC]" },
395
- responsive: (__VLS_ctx.responsiveRender),
396
- receiverId: (__VLS_ctx.receiverId),
397
- }, ...__VLS_functionalComponentArgsRest(__VLS_34));
398
- let __VLS_37;
399
- let __VLS_38;
400
- const __VLS_39 = ({ selectReceiver: {} },
401
- { onSelectReceiver: (__VLS_ctx.selectReceiver) });
402
- __VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CHAT_LIST) }, null, null);
403
- /** @type {typeof __VLS_ctx.chatListRef} */ ;
404
- var __VLS_40 = {};
405
- // @ts-ignore
406
- [currentPage, PAGE, responsiveRender, receiverId, selectReceiver, chatListRef,];
407
- var __VLS_36;
408
- /** @type {[typeof HomeComponent, ]} */ ;
409
- // @ts-ignore
410
- const __VLS_43 = __VLS_asFunctionalComponent(HomeComponent, new HomeComponent({
411
- ...{ 'onCall': {} },
412
- ...{ 'onBack': {} },
413
- ...{ 'onInputFocus': {} },
414
- ref: "homeComponentRef",
415
- receiverId: (__VLS_ctx.receiverId),
416
- ...{ class: "h-full pt-4" },
417
- responsive: (__VLS_ctx.responsiveRender),
418
- }));
419
- const __VLS_44 = __VLS_43({
420
- ...{ 'onCall': {} },
421
- ...{ 'onBack': {} },
422
- ...{ 'onInputFocus': {} },
423
- ref: "homeComponentRef",
424
- receiverId: (__VLS_ctx.receiverId),
425
- ...{ class: "h-full pt-4" },
426
- responsive: (__VLS_ctx.responsiveRender),
427
- }, ...__VLS_functionalComponentArgsRest(__VLS_43));
428
- let __VLS_46;
429
- let __VLS_47;
430
- const __VLS_48 = ({ call: {} },
431
- { onCall: (__VLS_ctx.handleCall) });
432
- const __VLS_49 = ({ back: {} },
433
- { onBack: (...[$event]) => {
434
- if (!!(!__VLS_ctx.isRouterReady))
435
- return;
436
- if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.TENANT_ERROR))
437
- return;
438
- if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_TENANT))
439
- return;
440
- if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_SUCCESS))
441
- return;
442
- if (!(__VLS_ctx.responsiveRender == 'mobile'))
443
- return;
444
- __VLS_ctx.currentPageConfig.backFunc?.();
399
+ const __VLS_27 = __VLS_asFunctionalComponent(IconArrowLeft, new IconArrowLeft({}));
400
+ const __VLS_28 = __VLS_27({}, ...__VLS_functionalComponentArgsRest(__VLS_27));
401
+ __VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
402
+ ...{ class: "text-xl font-semibold text-chat-haze-900 ml-3" },
403
+ });
404
+ (__VLS_ctx.currentPageConfig.backTitle ?? '');
405
+ // @ts-ignore
406
+ [currentPageConfig,];
407
+ if (props.isLib) {
408
+ __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
409
+ ...{ onClick: (...[$event]) => {
410
+ if (!!(!__VLS_ctx.isRouterReady))
411
+ return;
412
+ if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.TENANT_ERROR))
413
+ return;
414
+ if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_TENANT))
415
+ return;
416
+ if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_SUCCESS))
417
+ return;
418
+ if (!(__VLS_ctx.responsiveRender == 'mobile'))
419
+ return;
420
+ if (!(__VLS_ctx.currentPageConfig?.backFunc && !__VLS_ctx.currentPageConfig.isHidden))
421
+ return;
422
+ if (!(props.isLib))
423
+ return;
424
+ __VLS_ctx.emit('close');
425
+ // @ts-ignore
426
+ [emit,];
427
+ } },
428
+ ...{ class: "w-10 h-10" },
429
+ });
430
+ /** @type {[typeof IconCloseCircle, ]} */ ;
445
431
  // @ts-ignore
446
- [responsiveRender, currentPageConfig, receiverId, handleCall,];
447
- } });
448
- const __VLS_50 = ({ inputFocus: {} },
449
- { onInputFocus: (__VLS_ctx.handleReadMessage) });
450
- __VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.currentPage == __VLS_ctx.PAGE.HOME) }, null, null);
451
- /** @type {typeof __VLS_ctx.homeComponentRef} */ ;
452
- var __VLS_51 = {};
453
- // @ts-ignore
454
- [currentPage, PAGE, handleReadMessage, homeComponentRef,];
455
- var __VLS_45;
456
- if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_DETAIL) {
457
- // @ts-ignore
458
- [currentPage, PAGE,];
459
- /** @type {[typeof CustomerDetail, ]} */ ;
432
+ const __VLS_31 = __VLS_asFunctionalComponent(IconCloseCircle, new IconCloseCircle({}));
433
+ const __VLS_32 = __VLS_31({}, ...__VLS_functionalComponentArgsRest(__VLS_31));
434
+ }
435
+ }
436
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
437
+ ...{ class: "grow overflow-hidden" },
438
+ });
439
+ /** @type {[typeof ChatList, ]} */ ;
460
440
  // @ts-ignore
461
- const __VLS_54 = __VLS_asFunctionalComponent(CustomerDetail, new CustomerDetail({
462
- ref: "customerDetailRef",
463
- receiverId: (__VLS_ctx.receiverId),
464
- ...{ class: "w-full h-full" },
441
+ const __VLS_35 = __VLS_asFunctionalComponent(ChatList, new ChatList({
442
+ ...{ 'onSelectReceiver': {} },
443
+ ref: "chatListRef",
444
+ ...{ class: "w-full max-w-[500px] !bg-[#F9FAFC]" },
465
445
  responsive: (__VLS_ctx.responsiveRender),
466
- }));
467
- const __VLS_55 = __VLS_54({
468
- ref: "customerDetailRef",
469
446
  receiverId: (__VLS_ctx.receiverId),
470
- ...{ class: "w-full h-full" },
471
- responsive: (__VLS_ctx.responsiveRender),
472
- }, ...__VLS_functionalComponentArgsRest(__VLS_54));
473
- /** @type {typeof __VLS_ctx.customerDetailRef} */ ;
474
- var __VLS_57 = {};
475
- // @ts-ignore
476
- [responsiveRender, receiverId, customerDetailRef,];
477
- var __VLS_56;
478
- }
479
- if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_CHECK_IN) {
480
- // @ts-ignore
481
- [currentPage, PAGE,];
482
- /** @type {[typeof CustomerCheckIn, ]} */ ;
483
- // @ts-ignore
484
- const __VLS_60 = __VLS_asFunctionalComponent(CustomerCheckIn, new CustomerCheckIn({
485
- ...{ class: "w-full h-full" },
486
447
  }));
487
- const __VLS_61 = __VLS_60({
488
- ...{ class: "w-full h-full" },
489
- }, ...__VLS_functionalComponentArgsRest(__VLS_60));
490
- }
491
- if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_APPOINTMENT) {
492
- // @ts-ignore
493
- [currentPage, PAGE,];
494
- /** @type {[typeof CustomerAppointment, ]} */ ;
495
- // @ts-ignore
496
- const __VLS_64 = __VLS_asFunctionalComponent(CustomerAppointment, new CustomerAppointment({
497
- ...{ class: "w-full h-full" },
498
- }));
499
- const __VLS_65 = __VLS_64({
500
- ...{ class: "w-full h-full" },
501
- }, ...__VLS_functionalComponentArgsRest(__VLS_64));
502
- }
503
- if (__VLS_ctx.currentPage != __VLS_ctx.PAGE.HOME) {
448
+ const __VLS_36 = __VLS_35({
449
+ ...{ 'onSelectReceiver': {} },
450
+ ref: "chatListRef",
451
+ ...{ class: "w-full max-w-[500px] !bg-[#F9FAFC]" },
452
+ responsive: (__VLS_ctx.responsiveRender),
453
+ receiverId: (__VLS_ctx.receiverId),
454
+ }, ...__VLS_functionalComponentArgsRest(__VLS_35));
455
+ let __VLS_38;
456
+ let __VLS_39;
457
+ const __VLS_40 = ({ selectReceiver: {} },
458
+ { onSelectReceiver: (__VLS_ctx.selectReceiver) });
459
+ __VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CHAT_LIST) }, null, null);
460
+ /** @type {typeof __VLS_ctx.chatListRef} */ ;
461
+ var __VLS_41 = {};
504
462
  // @ts-ignore
505
- [currentPage, PAGE,];
506
- /** @type {[typeof MobileFooter, ]} */ ;
463
+ [currentPage, PAGE, responsiveRender, receiverId, selectReceiver, chatListRef,];
464
+ var __VLS_37;
465
+ /** @type {[typeof HomeComponent, ]} */ ;
507
466
  // @ts-ignore
508
- const __VLS_68 = __VLS_asFunctionalComponent(MobileFooter, new MobileFooter({
509
- ...{ class: "shrink-0" },
467
+ const __VLS_44 = __VLS_asFunctionalComponent(HomeComponent, new HomeComponent({
468
+ ...{ 'onCall': {} },
469
+ ...{ 'onBack': {} },
470
+ ...{ 'onInputFocus': {} },
471
+ ref: "homeComponentRef",
472
+ receiverId: (__VLS_ctx.receiverId),
473
+ ...{ class: "h-full pt-4" },
474
+ responsive: (__VLS_ctx.responsiveRender),
510
475
  }));
511
- const __VLS_69 = __VLS_68({
512
- ...{ class: "shrink-0" },
513
- }, ...__VLS_functionalComponentArgsRest(__VLS_68));
514
- }
515
- }
516
- else {
517
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
518
- ...{ class: "flex gap-4 h-full relative" },
519
- });
520
- /** @type {[typeof ChatList, ]} */ ;
521
- // @ts-ignore
522
- const __VLS_72 = __VLS_asFunctionalComponent(ChatList, new ChatList({
523
- ...{ 'onSelectReceiver': {} },
524
- ref: "chatListRef",
525
- ...{ class: "w-[38%] max-w-[500px] min-w-[450px]" },
526
- responsive: (__VLS_ctx.responsiveRender),
527
- receiverId: (__VLS_ctx.receiverId),
528
- }));
529
- const __VLS_73 = __VLS_72({
530
- ...{ 'onSelectReceiver': {} },
531
- ref: "chatListRef",
532
- ...{ class: "w-[38%] max-w-[500px] min-w-[450px]" },
533
- responsive: (__VLS_ctx.responsiveRender),
534
- receiverId: (__VLS_ctx.receiverId),
535
- }, ...__VLS_functionalComponentArgsRest(__VLS_72));
536
- let __VLS_75;
537
- let __VLS_76;
538
- const __VLS_77 = ({ selectReceiver: {} },
539
- { onSelectReceiver: (__VLS_ctx.selectReceiver) });
540
- /** @type {typeof __VLS_ctx.chatListRef} */ ;
541
- var __VLS_78 = {};
542
- // @ts-ignore
543
- [responsiveRender, receiverId, selectReceiver, chatListRef,];
544
- var __VLS_74;
545
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
546
- ...{ class: "chat-box-white grow flex flex-col h-full pt-6 overflow-hidden" },
547
- });
548
- if (__VLS_ctx.currentPageConfig?.backFunc) {
549
- // @ts-ignore
550
- [currentPageConfig,];
551
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
552
- ...{ class: "text-[#141B34] px-6" },
553
- });
554
- __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
555
- ...{ onClick: (...[$event]) => {
476
+ const __VLS_45 = __VLS_44({
477
+ ...{ 'onCall': {} },
478
+ ...{ 'onBack': {} },
479
+ ...{ 'onInputFocus': {} },
480
+ ref: "homeComponentRef",
481
+ receiverId: (__VLS_ctx.receiverId),
482
+ ...{ class: "h-full pt-4" },
483
+ responsive: (__VLS_ctx.responsiveRender),
484
+ }, ...__VLS_functionalComponentArgsRest(__VLS_44));
485
+ let __VLS_47;
486
+ let __VLS_48;
487
+ const __VLS_49 = ({ call: {} },
488
+ { onCall: (__VLS_ctx.handleCall) });
489
+ const __VLS_50 = ({ back: {} },
490
+ { onBack: (...[$event]) => {
556
491
  if (!!(!__VLS_ctx.isRouterReady))
557
492
  return;
558
493
  if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.TENANT_ERROR))
@@ -561,146 +496,230 @@ else {
561
496
  return;
562
497
  if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_SUCCESS))
563
498
  return;
564
- if (!!(__VLS_ctx.responsiveRender == 'mobile'))
565
- return;
566
- if (!(__VLS_ctx.currentPageConfig?.backFunc))
499
+ if (!(__VLS_ctx.responsiveRender == 'mobile'))
567
500
  return;
568
- __VLS_ctx.currentPageConfig.backFunc();
501
+ __VLS_ctx.currentPageConfig.backFunc?.();
569
502
  // @ts-ignore
570
- [currentPageConfig,];
571
- } },
572
- ...{ class: "flex items-center" },
573
- });
574
- /** @type {[typeof IconArrowLeft, ]} */ ;
503
+ [responsiveRender, currentPageConfig, receiverId, handleCall,];
504
+ } });
505
+ const __VLS_51 = ({ inputFocus: {} },
506
+ { onInputFocus: (__VLS_ctx.handleReadMessage) });
507
+ __VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.currentPage == __VLS_ctx.PAGE.HOME) }, null, null);
508
+ /** @type {typeof __VLS_ctx.homeComponentRef} */ ;
509
+ var __VLS_52 = {};
575
510
  // @ts-ignore
576
- const __VLS_81 = __VLS_asFunctionalComponent(IconArrowLeft, new IconArrowLeft({}));
577
- const __VLS_82 = __VLS_81({}, ...__VLS_functionalComponentArgsRest(__VLS_81));
578
- __VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
579
- ...{ class: "text-xl font-semibold text-chat-haze-900 ml-3" },
511
+ [currentPage, PAGE, handleReadMessage, homeComponentRef,];
512
+ var __VLS_46;
513
+ if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_DETAIL) {
514
+ // @ts-ignore
515
+ [currentPage, PAGE,];
516
+ /** @type {[typeof CustomerDetail, ]} */ ;
517
+ // @ts-ignore
518
+ const __VLS_55 = __VLS_asFunctionalComponent(CustomerDetail, new CustomerDetail({
519
+ ref: "customerDetailRef",
520
+ receiverId: (__VLS_ctx.receiverId),
521
+ ...{ class: "w-full h-full" },
522
+ responsive: (__VLS_ctx.responsiveRender),
523
+ }));
524
+ const __VLS_56 = __VLS_55({
525
+ ref: "customerDetailRef",
526
+ receiverId: (__VLS_ctx.receiverId),
527
+ ...{ class: "w-full h-full" },
528
+ responsive: (__VLS_ctx.responsiveRender),
529
+ }, ...__VLS_functionalComponentArgsRest(__VLS_55));
530
+ /** @type {typeof __VLS_ctx.customerDetailRef} */ ;
531
+ var __VLS_58 = {};
532
+ // @ts-ignore
533
+ [responsiveRender, receiverId, customerDetailRef,];
534
+ var __VLS_57;
535
+ }
536
+ if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_CHECK_IN) {
537
+ // @ts-ignore
538
+ [currentPage, PAGE,];
539
+ /** @type {[typeof CustomerCheckIn, ]} */ ;
540
+ // @ts-ignore
541
+ const __VLS_61 = __VLS_asFunctionalComponent(CustomerCheckIn, new CustomerCheckIn({
542
+ ...{ class: "w-full h-full" },
543
+ }));
544
+ const __VLS_62 = __VLS_61({
545
+ ...{ class: "w-full h-full" },
546
+ }, ...__VLS_functionalComponentArgsRest(__VLS_61));
547
+ }
548
+ if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_APPOINTMENT) {
549
+ // @ts-ignore
550
+ [currentPage, PAGE,];
551
+ /** @type {[typeof CustomerAppointment, ]} */ ;
552
+ // @ts-ignore
553
+ const __VLS_65 = __VLS_asFunctionalComponent(CustomerAppointment, new CustomerAppointment({
554
+ ...{ class: "w-full h-full" },
555
+ }));
556
+ const __VLS_66 = __VLS_65({
557
+ ...{ class: "w-full h-full" },
558
+ }, ...__VLS_functionalComponentArgsRest(__VLS_65));
559
+ }
560
+ if (__VLS_ctx.currentPage != __VLS_ctx.PAGE.HOME) {
561
+ // @ts-ignore
562
+ [currentPage, PAGE,];
563
+ /** @type {[typeof MobileFooter, ]} */ ;
564
+ // @ts-ignore
565
+ const __VLS_69 = __VLS_asFunctionalComponent(MobileFooter, new MobileFooter({
566
+ ...{ class: "shrink-0" },
567
+ }));
568
+ const __VLS_70 = __VLS_69({
569
+ ...{ class: "shrink-0" },
570
+ }, ...__VLS_functionalComponentArgsRest(__VLS_69));
571
+ }
572
+ }
573
+ else {
574
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
575
+ ...{ class: "flex gap-4 h-full relative" },
580
576
  });
581
- (__VLS_ctx.currentPageConfig.backTitle ?? '');
577
+ /** @type {[typeof ChatList, ]} */ ;
582
578
  // @ts-ignore
583
- [currentPageConfig,];
584
- }
585
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
586
- ...{ class: "grow overflow-hidden" },
587
- });
588
- /** @type {[typeof HomeComponent, ]} */ ;
589
- // @ts-ignore
590
- const __VLS_85 = __VLS_asFunctionalComponent(HomeComponent, new HomeComponent({
591
- ...{ 'onCall': {} },
592
- ...{ 'onInputFocus': {} },
593
- ref: "homeComponentRef",
594
- receiverId: (__VLS_ctx.receiverId),
595
- ...{ class: "h-full" },
596
- responsive: (__VLS_ctx.responsiveRender),
597
- }));
598
- const __VLS_86 = __VLS_85({
599
- ...{ 'onCall': {} },
600
- ...{ 'onInputFocus': {} },
601
- ref: "homeComponentRef",
602
- receiverId: (__VLS_ctx.receiverId),
603
- ...{ class: "h-full" },
604
- responsive: (__VLS_ctx.responsiveRender),
605
- }, ...__VLS_functionalComponentArgsRest(__VLS_85));
606
- let __VLS_88;
607
- let __VLS_89;
608
- const __VLS_90 = ({ call: {} },
609
- { onCall: (__VLS_ctx.handleCall) });
610
- const __VLS_91 = ({ inputFocus: {} },
611
- { onInputFocus: (__VLS_ctx.handleReadMessage) });
612
- __VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.currentPage == __VLS_ctx.PAGE.HOME && __VLS_ctx.receiverId) }, null, null);
613
- /** @type {typeof __VLS_ctx.homeComponentRef} */ ;
614
- var __VLS_92 = {};
615
- // @ts-ignore
616
- [currentPage, PAGE, responsiveRender, receiverId, receiverId, handleCall, handleReadMessage, homeComponentRef,];
617
- var __VLS_87;
618
- if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_DETAIL) {
579
+ const __VLS_73 = __VLS_asFunctionalComponent(ChatList, new ChatList({
580
+ ...{ 'onSelectReceiver': {} },
581
+ ref: "chatListRef",
582
+ ...{ class: "w-[38%] max-w-[500px] min-w-[450px]" },
583
+ responsive: (__VLS_ctx.responsiveRender),
584
+ receiverId: (__VLS_ctx.receiverId),
585
+ }));
586
+ const __VLS_74 = __VLS_73({
587
+ ...{ 'onSelectReceiver': {} },
588
+ ref: "chatListRef",
589
+ ...{ class: "w-[38%] max-w-[500px] min-w-[450px]" },
590
+ responsive: (__VLS_ctx.responsiveRender),
591
+ receiverId: (__VLS_ctx.receiverId),
592
+ }, ...__VLS_functionalComponentArgsRest(__VLS_73));
593
+ let __VLS_76;
594
+ let __VLS_77;
595
+ const __VLS_78 = ({ selectReceiver: {} },
596
+ { onSelectReceiver: (__VLS_ctx.selectReceiver) });
597
+ /** @type {typeof __VLS_ctx.chatListRef} */ ;
598
+ var __VLS_79 = {};
619
599
  // @ts-ignore
620
- [currentPage, PAGE,];
621
- /** @type {[typeof CustomerDetail, ]} */ ;
600
+ [responsiveRender, receiverId, selectReceiver, chatListRef,];
601
+ var __VLS_75;
602
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
603
+ ...{ class: "chat-box-white grow flex flex-col h-full pt-6 overflow-hidden" },
604
+ });
605
+ if (__VLS_ctx.currentPageConfig?.backFunc) {
606
+ // @ts-ignore
607
+ [currentPageConfig,];
608
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
609
+ ...{ class: "text-[#141B34] px-6" },
610
+ });
611
+ __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
612
+ ...{ onClick: (...[$event]) => {
613
+ if (!!(!__VLS_ctx.isRouterReady))
614
+ return;
615
+ if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.TENANT_ERROR))
616
+ return;
617
+ if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_TENANT))
618
+ return;
619
+ if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_SUCCESS))
620
+ return;
621
+ if (!!(__VLS_ctx.responsiveRender == 'mobile'))
622
+ return;
623
+ if (!(__VLS_ctx.currentPageConfig?.backFunc))
624
+ return;
625
+ __VLS_ctx.currentPageConfig.backFunc();
626
+ // @ts-ignore
627
+ [currentPageConfig,];
628
+ } },
629
+ ...{ class: "flex items-center" },
630
+ });
631
+ /** @type {[typeof IconArrowLeft, ]} */ ;
632
+ // @ts-ignore
633
+ const __VLS_82 = __VLS_asFunctionalComponent(IconArrowLeft, new IconArrowLeft({}));
634
+ const __VLS_83 = __VLS_82({}, ...__VLS_functionalComponentArgsRest(__VLS_82));
635
+ __VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
636
+ ...{ class: "text-xl font-semibold text-chat-haze-900 ml-3" },
637
+ });
638
+ (__VLS_ctx.currentPageConfig.backTitle ?? '');
639
+ // @ts-ignore
640
+ [currentPageConfig,];
641
+ }
642
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
643
+ ...{ class: "grow overflow-hidden" },
644
+ });
645
+ /** @type {[typeof HomeComponent, ]} */ ;
622
646
  // @ts-ignore
623
- const __VLS_95 = __VLS_asFunctionalComponent(CustomerDetail, new CustomerDetail({
624
- ref: "customerDetailRef",
647
+ const __VLS_86 = __VLS_asFunctionalComponent(HomeComponent, new HomeComponent({
648
+ ...{ 'onCall': {} },
649
+ ...{ 'onInputFocus': {} },
650
+ ref: "homeComponentRef",
625
651
  receiverId: (__VLS_ctx.receiverId),
626
652
  ...{ class: "h-full" },
627
653
  responsive: (__VLS_ctx.responsiveRender),
628
654
  }));
629
- const __VLS_96 = __VLS_95({
630
- ref: "customerDetailRef",
655
+ const __VLS_87 = __VLS_86({
656
+ ...{ 'onCall': {} },
657
+ ...{ 'onInputFocus': {} },
658
+ ref: "homeComponentRef",
631
659
  receiverId: (__VLS_ctx.receiverId),
632
660
  ...{ class: "h-full" },
633
661
  responsive: (__VLS_ctx.responsiveRender),
634
- }, ...__VLS_functionalComponentArgsRest(__VLS_95));
635
- /** @type {typeof __VLS_ctx.customerDetailRef} */ ;
636
- var __VLS_98 = {};
637
- // @ts-ignore
638
- [responsiveRender, receiverId, customerDetailRef,];
639
- var __VLS_97;
640
- }
641
- if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_CHECK_IN) {
662
+ }, ...__VLS_functionalComponentArgsRest(__VLS_86));
663
+ let __VLS_89;
664
+ let __VLS_90;
665
+ const __VLS_91 = ({ call: {} },
666
+ { onCall: (__VLS_ctx.handleCall) });
667
+ const __VLS_92 = ({ inputFocus: {} },
668
+ { onInputFocus: (__VLS_ctx.handleReadMessage) });
669
+ __VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.currentPage == __VLS_ctx.PAGE.HOME && __VLS_ctx.receiverId) }, null, null);
670
+ /** @type {typeof __VLS_ctx.homeComponentRef} */ ;
671
+ var __VLS_93 = {};
642
672
  // @ts-ignore
643
- [currentPage, PAGE,];
644
- /** @type {[typeof CustomerCheckIn, ]} */ ;
645
- // @ts-ignore
646
- const __VLS_101 = __VLS_asFunctionalComponent(CustomerCheckIn, new CustomerCheckIn({
647
- ...{ class: "h-full" },
648
- }));
649
- const __VLS_102 = __VLS_101({
650
- ...{ class: "h-full" },
651
- }, ...__VLS_functionalComponentArgsRest(__VLS_101));
652
- }
653
- if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_APPOINTMENT) {
654
- // @ts-ignore
655
- [currentPage, PAGE,];
656
- /** @type {[typeof CustomerAppointment, ]} */ ;
657
- // @ts-ignore
658
- const __VLS_105 = __VLS_asFunctionalComponent(CustomerAppointment, new CustomerAppointment({
659
- ...{ class: "h-full" },
660
- }));
661
- const __VLS_106 = __VLS_105({
662
- ...{ class: "h-full" },
663
- }, ...__VLS_functionalComponentArgsRest(__VLS_105));
673
+ [currentPage, PAGE, responsiveRender, receiverId, receiverId, handleCall, handleReadMessage, homeComponentRef,];
674
+ var __VLS_88;
675
+ if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_DETAIL) {
676
+ // @ts-ignore
677
+ [currentPage, PAGE,];
678
+ /** @type {[typeof CustomerDetail, ]} */ ;
679
+ // @ts-ignore
680
+ const __VLS_96 = __VLS_asFunctionalComponent(CustomerDetail, new CustomerDetail({
681
+ ref: "customerDetailRef",
682
+ receiverId: (__VLS_ctx.receiverId),
683
+ ...{ class: "h-full" },
684
+ responsive: (__VLS_ctx.responsiveRender),
685
+ }));
686
+ const __VLS_97 = __VLS_96({
687
+ ref: "customerDetailRef",
688
+ receiverId: (__VLS_ctx.receiverId),
689
+ ...{ class: "h-full" },
690
+ responsive: (__VLS_ctx.responsiveRender),
691
+ }, ...__VLS_functionalComponentArgsRest(__VLS_96));
692
+ /** @type {typeof __VLS_ctx.customerDetailRef} */ ;
693
+ var __VLS_99 = {};
694
+ // @ts-ignore
695
+ [responsiveRender, receiverId, customerDetailRef,];
696
+ var __VLS_98;
697
+ }
698
+ if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_CHECK_IN) {
699
+ // @ts-ignore
700
+ [currentPage, PAGE,];
701
+ /** @type {[typeof CustomerCheckIn, ]} */ ;
702
+ // @ts-ignore
703
+ const __VLS_102 = __VLS_asFunctionalComponent(CustomerCheckIn, new CustomerCheckIn({
704
+ ...{ class: "h-full" },
705
+ }));
706
+ const __VLS_103 = __VLS_102({
707
+ ...{ class: "h-full" },
708
+ }, ...__VLS_functionalComponentArgsRest(__VLS_102));
709
+ }
710
+ if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_APPOINTMENT) {
711
+ // @ts-ignore
712
+ [currentPage, PAGE,];
713
+ /** @type {[typeof CustomerAppointment, ]} */ ;
714
+ // @ts-ignore
715
+ const __VLS_106 = __VLS_asFunctionalComponent(CustomerAppointment, new CustomerAppointment({
716
+ ...{ class: "h-full" },
717
+ }));
718
+ const __VLS_107 = __VLS_106({
719
+ ...{ class: "h-full" },
720
+ }, ...__VLS_functionalComponentArgsRest(__VLS_106));
721
+ }
664
722
  }
665
- /** @type {[typeof Calling, ]} */ ;
666
- // @ts-ignore
667
- const __VLS_109 = __VLS_asFunctionalComponent(Calling, new Calling({
668
- ...{ 'onUserCalling': {} },
669
- ...{ 'onEndCall': {} },
670
- ref: "callingRef",
671
- responsive: (__VLS_ctx.responsiveRender),
672
- }));
673
- const __VLS_110 = __VLS_109({
674
- ...{ 'onUserCalling': {} },
675
- ...{ 'onEndCall': {} },
676
- ref: "callingRef",
677
- responsive: (__VLS_ctx.responsiveRender),
678
- }, ...__VLS_functionalComponentArgsRest(__VLS_109));
679
- let __VLS_112;
680
- let __VLS_113;
681
- const __VLS_114 = ({ userCalling: {} },
682
- { onUserCalling: (...[$event]) => {
683
- if (!!(!__VLS_ctx.isRouterReady))
684
- return;
685
- if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.TENANT_ERROR))
686
- return;
687
- if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_TENANT))
688
- return;
689
- if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_SUCCESS))
690
- return;
691
- if (!!(__VLS_ctx.responsiveRender == 'mobile'))
692
- return;
693
- __VLS_ctx.emit('userCalling', $event);
694
- // @ts-ignore
695
- [responsiveRender, emit,];
696
- } });
697
- const __VLS_115 = ({ endCall: {} },
698
- { onEndCall: (__VLS_ctx.handleEndCall) });
699
- /** @type {typeof __VLS_ctx.callingRef} */ ;
700
- var __VLS_116 = {};
701
- // @ts-ignore
702
- [handleEndCall, callingRef,];
703
- var __VLS_111;
704
723
  }
705
724
  /** @type {__VLS_StyleScopedClasses['go-chat-main']} */ ;
706
725
  /** @type {__VLS_StyleScopedClasses['max-w-full']} */ ;
@@ -710,6 +729,24 @@ else {
710
729
  /** @type {__VLS_StyleScopedClasses['m-auto']} */ ;
711
730
  /** @type {__VLS_StyleScopedClasses['flex-center']} */ ;
712
731
  /** @type {__VLS_StyleScopedClasses['sc-full']} */ ;
732
+ /** @type {__VLS_StyleScopedClasses['w-full']} */ ;
733
+ /** @type {__VLS_StyleScopedClasses['h-full']} */ ;
734
+ /** @type {__VLS_StyleScopedClasses['overflow-hidden']} */ ;
735
+ /** @type {__VLS_StyleScopedClasses['relative']} */ ;
736
+ /** @type {__VLS_StyleScopedClasses['w-full']} */ ;
737
+ /** @type {__VLS_StyleScopedClasses['bg-chat-error']} */ ;
738
+ /** @type {__VLS_StyleScopedClasses['text-white']} */ ;
739
+ /** @type {__VLS_StyleScopedClasses['text-sm']} */ ;
740
+ /** @type {__VLS_StyleScopedClasses['px-4']} */ ;
741
+ /** @type {__VLS_StyleScopedClasses['py-2']} */ ;
742
+ /** @type {__VLS_StyleScopedClasses['flex']} */ ;
743
+ /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
744
+ /** @type {__VLS_StyleScopedClasses['gap-2']} */ ;
745
+ /** @type {__VLS_StyleScopedClasses['bg-white']} */ ;
746
+ /** @type {__VLS_StyleScopedClasses['text-chat-haze-600']} */ ;
747
+ /** @type {__VLS_StyleScopedClasses['font-bold']} */ ;
748
+ /** @type {__VLS_StyleScopedClasses['w-[250px]']} */ ;
749
+ /** @type {__VLS_StyleScopedClasses['rounded-lg']} */ ;
713
750
  /** @type {__VLS_StyleScopedClasses['relative']} */ ;
714
751
  /** @type {__VLS_StyleScopedClasses['flex']} */ ;
715
752
  /** @type {__VLS_StyleScopedClasses['flex-col']} */ ;
@@ -777,7 +814,7 @@ else {
777
814
  /** @type {__VLS_StyleScopedClasses['h-full']} */ ;
778
815
  /** @type {__VLS_StyleScopedClasses['h-full']} */ ;
779
816
  // @ts-ignore
780
- var __VLS_24 = __VLS_23, __VLS_41 = __VLS_40, __VLS_52 = __VLS_51, __VLS_58 = __VLS_57, __VLS_79 = __VLS_78, __VLS_93 = __VLS_92, __VLS_99 = __VLS_98, __VLS_117 = __VLS_116;
817
+ var __VLS_25 = __VLS_24, __VLS_42 = __VLS_41, __VLS_53 = __VLS_52, __VLS_59 = __VLS_58, __VLS_80 = __VLS_79, __VLS_94 = __VLS_93, __VLS_100 = __VLS_99;
781
818
  const __VLS_export = (await import('vue')).defineComponent({
782
819
  setup: () => (__VLS_exposed),
783
820
  __typeEmits: {},