@phonghq/go-chat 1.0.23 → 1.0.25

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.
Files changed (56) hide show
  1. package/README.md +1 -1
  2. package/dist/assets/icons/IconCloseCircle.vue.d.ts +2 -0
  3. package/dist/assets/icons/IconSetting.vue.d.ts +2 -0
  4. package/dist/chat/App.vue.d.ts +2 -0
  5. package/dist/chat/page/home/ChatList.vue.d.ts +6 -3
  6. package/dist/chat/page/home/ChatMessage.vue.d.ts +2 -0
  7. package/dist/chat/page/home/ChatMessageItem.vue.d.ts +18 -0
  8. package/dist/chat/page/home/Home.vue.d.ts +4 -0
  9. package/dist/chat/page/setting/Setting.vue.d.ts +2 -0
  10. package/dist/components/chat/call/Calling.vue.d.ts +2 -0
  11. package/dist/components/chat/common/switch/SwitchBase.vue.d.ts +14 -0
  12. package/dist/components/chat/common/tab/TabBase.vue.d.ts +30 -0
  13. package/dist/components/chat/select/SelectBase.vue.d.ts +2 -0
  14. package/dist/components/common/drawer/DrawerBase.vue.d.ts +1 -1
  15. package/dist/components/common/drawer/DrawerBaseCustom.vue.d.ts +1 -0
  16. package/dist/composable/useCallHelper.d.ts +2 -0
  17. package/dist/composable/useListConversations.d.ts +48 -0
  18. package/dist/constant/color.d.ts +2 -2
  19. package/dist/go-chat.es.js +28838 -28734
  20. package/dist/go-chat.umd.js +14 -14
  21. package/dist/style.css +1 -1
  22. package/dist/test/assets/icons/IconCloseCircle.vue.js +36 -0
  23. package/dist/test/assets/icons/IconSetting.vue.js +33 -0
  24. package/dist/test/chat/App.vue.js +191 -90
  25. package/dist/test/chat/page/customer-detail/CustomerDetail.vue.js +0 -3
  26. package/dist/test/chat/page/home/ChatList.vue.js +225 -137
  27. package/dist/test/chat/page/home/ChatMessage.vue.js +45 -181
  28. package/dist/test/chat/page/home/ChatMessageItem.vue.js +335 -0
  29. package/dist/test/chat/page/home/Home.vue.js +38 -65
  30. package/dist/test/chat/page/home/HomeHeader.vue.js +18 -18
  31. package/dist/test/chat/page/home/InputChat.vue.js +62 -34
  32. package/dist/test/chat/page/setting/Setting.vue.js +125 -0
  33. package/dist/test/components/chat/call/Calling.vue.js +36 -24
  34. package/dist/test/components/chat/common/switch/SwitchBase.vue.js +70 -0
  35. package/dist/test/components/chat/common/tab/TabBase.vue.js +85 -0
  36. package/dist/test/components/chat/select/SelectBase.vue.js +26 -18
  37. package/dist/test/components/common/drawer/DrawerBaseCustom.vue.js +9 -4
  38. package/dist/test/composable/useDigibot.js +2 -1
  39. package/dist/test/composable/useInitData.js +4 -7
  40. package/dist/test/composable/useListConversations.js +124 -0
  41. package/dist/test/composable/usePlivo.js +18 -6
  42. package/dist/test/constant/color.js +4 -2
  43. package/dist/test/types/chat/call.js +4 -1
  44. package/dist/test/utils/chat/auth.js +15 -0
  45. package/dist/test/utils/chat/conversation.js +57 -0
  46. package/dist/test/utils/chat/phone-string.js +1 -1
  47. package/dist/types/chat/auth.d.ts +2 -0
  48. package/dist/types/chat/call.d.ts +3 -0
  49. package/dist/types/chat/global.d.ts +1 -0
  50. package/dist/types/conversation.d.ts +3 -1
  51. package/dist/types/message.d.ts +6 -0
  52. package/dist/utils/chat/auth.d.ts +5 -0
  53. package/dist/utils/chat/conversation.d.ts +7 -0
  54. package/dist/utils/chat/phone-string.d.ts +1 -1
  55. package/dist/utils/chat/user.d.ts +2 -0
  56. package/package.json +1 -1
@@ -1,15 +1,10 @@
1
1
  import InputSearch from '../../../components/chat/common/input/InputSearch.vue';
2
2
  import IconPlus from '../../../assets/icons/IconPlus.vue';
3
- import { nextTick, onMounted, onUnmounted, ref } from 'vue';
3
+ import { computed, ref } from 'vue';
4
4
  import Avatar from '../../../components/chat/customer/Avatar.vue';
5
- import { getConversation } from '../../../utils/chat/conversation';
6
- import BaseSpin from '../../../components/chat/common/spin/BaseSpin.vue';
7
5
  import ScrollEvent from '../../../components/chat/ScrollEvent/ScrollEvent.vue';
8
6
  import { useDebounce } from '../../../utils/debounce';
9
- import { addHandleMqttMessage, connectMqtt, removeHandleMqttMessage, subscribeToTopic, unsubscribeFromTopic } from '../../../plugins/mqtt';
10
- import { TOPIC_HOME, TOPIC_STATUS_USER } from '../../../constant/mqtt';
11
7
  import { dataProfile } from '../../../utils/chat/auth';
12
- import { readMessages } from '../../../utils/chat/message';
13
8
  import dayjs from 'dayjs';
14
9
  import relativeTime from 'dayjs/plugin/relativeTime';
15
10
  import updateLocale from 'dayjs/plugin/updateLocale';
@@ -18,6 +13,8 @@ import timezone from 'dayjs/plugin/timezone';
18
13
  import { useDigibot } from '../../../composable/useDigibot';
19
14
  import { TIME_ZONE_UTC } from '../../../constant/datetime';
20
15
  import IconAiCheck from '../../../assets/icons/IconAiCheck.vue';
16
+ import TabBase from '../../../components/chat/common/tab/TabBase.vue';
17
+ import { useListConversations } from '../../../composable/useListConversations';
21
18
  dayjs.extend(updateLocale);
22
19
  dayjs.extend(relativeTime);
23
20
  dayjs.extend(utc);
@@ -41,99 +38,135 @@ dayjs.updateLocale('en', {
41
38
  });
42
39
  const props = withDefaults(defineProps(), {});
43
40
  const emit = defineEmits();
41
+ const TAB_VALUE = {
42
+ ALL: 0,
43
+ UNKNOWN: 1
44
+ };
45
+ const tabs = computed(() => [
46
+ { label: 'All', value: TAB_VALUE.ALL },
47
+ { label: 'Message Requests', value: TAB_VALUE.UNKNOWN, badge: (listConversationsUnknown.value?.length || '').toString() }
48
+ ]);
44
49
  const { digibotData, digibotId } = useDigibot();
50
+ const { listConversations: listConversationsAll, getData: getDataAll, params: paramsAll, pageCount: pageCountAll, handleReadMessage: handleReadMessageAll } = useListConversations(TAB_VALUE.ALL);
51
+ const { listConversations: listConversationsUnknown, getData: getDataUnknown, params: paramsUnknown, pageCount: pageCountUnknown, handleReadMessage: handleReadMessageUnknown } = useListConversations(TAB_VALUE.UNKNOWN);
45
52
  const receiver_id = defineModel('receiverId');
53
+ const listConversations = computed(() => {
54
+ if (activeTabs.value == TAB_VALUE.ALL)
55
+ return listConversationsAll.value;
56
+ return listConversationsUnknown.value;
57
+ });
46
58
  const isOpen = ref(false);
47
59
  const keyword = ref('');
60
+ const activeTabs = ref(TAB_VALUE.ALL);
48
61
  const scrollEventRef = ref(null);
49
- const listConversations = ref([]);
50
- const params = ref({
51
- page: 1,
52
- search: ''
53
- });
54
- let pageCount = 0;
62
+ // const listConversations = ref<IConversation[]>([])
63
+ // const params = ref({
64
+ // page: 1,
65
+ // search: ''
66
+ // })
67
+ // let pageCount = 0
55
68
  const isLoadingSearch = ref(false);
56
- onMounted(() => {
57
- handleConnectMqtt();
58
- });
59
- onUnmounted(() => {
60
- handleDisconnectMqtt;
61
- });
62
- const handleDisconnectMqtt = () => {
63
- TOPIC_HOME.forEach((item) => {
64
- unsubscribeFromTopic(item + dataProfile.value?.id);
65
- removeHandleMqttMessage('chat-list-' + item);
66
- });
67
- if (dataProfile.value?.user_type == 'tenant') {
68
- subscribeToTopic(TOPIC_STATUS_USER + dataProfile.value?.id);
69
- removeHandleMqttMessage('chat-list-' + TOPIC_STATUS_USER);
70
- }
71
- };
72
- const handleConnectMqtt = async () => {
73
- try {
74
- if (dataProfile.value) {
75
- await connectMqtt();
76
- TOPIC_HOME.forEach((item) => {
77
- subscribeToTopic(item + dataProfile.value?.id);
78
- addHandleMqttMessage('chat-list-' + item, item + dataProfile.value?.id, mqttMessageHandler);
79
- });
80
- subscribeToTopic(TOPIC_STATUS_USER + dataProfile.value?.id);
81
- addHandleMqttMessage('chat-list-' + TOPIC_STATUS_USER, TOPIC_STATUS_USER + dataProfile.value?.id, mqttMessageHandler);
82
- }
83
- }
84
- catch (error) {
85
- console.error(error);
86
- }
87
- };
88
- const mqttMessageHandler = (topic, data) => {
89
- getDataMqtt();
90
- if (topic === TOPIC_HOME[0] + dataProfile.value?.id) {
91
- const index = listConversations.value.findIndex((item) => item.id === data.id);
92
- const hasChatBox = listConversations.value.findIndex((item) => item.id === digibotId);
93
- if (index != -1) {
94
- listConversations.value.splice(index, 1);
95
- }
96
- if (hasChatBox > -1) {
97
- listConversations.value.splice(1, 0, data);
98
- }
99
- else {
100
- listConversations.value.unshift(data);
101
- }
102
- }
103
- if (topic === TOPIC_HOME[1] + dataProfile.value?.id) {
104
- const index = listConversations.value.findIndex((item) => item.id === data.id);
105
- if (index != -1) {
106
- listConversations.value[index].unread_count = 0;
107
- }
108
- }
109
- if (topic === TOPIC_HOME[2] + dataProfile.value?.id) {
110
- listConversations.value.unshift(data?.conversations);
111
- }
112
- if (topic === TOPIC_STATUS_USER + dataProfile.value?.id) {
113
- const index = listConversations.value.findIndex((e) => e.receiver_id == Number(data?.customer_id));
114
- if (index != -1) {
115
- listConversations.value[index].status = data.is_online ? 1 : 0;
116
- }
117
- }
118
- };
119
- const getDataMqtt = useDebounce(() => {
120
- getData(undefined, { hideLoading: true, reset: true });
121
- }, 5000);
69
+ //
70
+ // onMounted(() => {
71
+ // handleConnectMqtt()
72
+ // })
73
+ //
74
+ // onUnmounted(() => {
75
+ // handleDisconnectMqtt
76
+ // })
77
+ //
78
+ // const handleDisconnectMqtt = () => {
79
+ // TOPIC_HOME.forEach((item: string) => {
80
+ // unsubscribeFromTopic(item + dataProfile.value?.id)
81
+ // removeHandleMqttMessage('chat-list-' + item)
82
+ // })
83
+ // if (dataProfile.value?.user_type == 'tenant') {
84
+ // subscribeToTopic(TOPIC_STATUS_USER + dataProfile.value?.id)
85
+ // removeHandleMqttMessage('chat-list-' + TOPIC_STATUS_USER)
86
+ // }
87
+ // }
88
+ //
89
+ // const handleConnectMqtt = async () => {
90
+ // try {
91
+ // if (dataProfile.value) {
92
+ // await connectMqtt()
93
+ // TOPIC_HOME.forEach((item: string) => {
94
+ // subscribeToTopic(item + dataProfile.value?.id)
95
+ // addHandleMqttMessage('chat-list-' + item, item + dataProfile.value?.id, mqttMessageHandler)
96
+ // })
97
+ // subscribeToTopic(TOPIC_STATUS_USER + dataProfile.value?.id)
98
+ // addHandleMqttMessage(
99
+ // 'chat-list-' + TOPIC_STATUS_USER,
100
+ // TOPIC_STATUS_USER + dataProfile.value?.id,
101
+ // mqttMessageHandler
102
+ // )
103
+ // }
104
+ // } catch (error) {
105
+ // console.error(error)
106
+ // }
107
+ // }
108
+ //
109
+ // const mqttMessageHandler = (topic: string, data: any) => {
110
+ // getDataMqtt()
111
+ // if (topic === TOPIC_HOME[0] + dataProfile.value?.id) {
112
+ // const index = listConversations.value.findIndex((item: any) => item.id === data.id)
113
+ // const hasChatBox = listConversations.value.findIndex((item: any) => item.id === digibotId)
114
+ // if (index != -1) {
115
+ // listConversations.value.splice(index, 1)
116
+ // }
117
+ // if (hasChatBox > -1) {
118
+ // listConversations.value.splice(1, 0, data)
119
+ // } else {
120
+ // listConversations.value.unshift(data)
121
+ // }
122
+ // }
123
+ //
124
+ // if (topic === TOPIC_HOME[1] + dataProfile.value?.id) {
125
+ // const index = listConversations.value.findIndex((item: any) => item.id === data.id)
126
+ // if (index != -1) {
127
+ // listConversations.value[index].unread_count = 0
128
+ // }
129
+ // }
130
+ //
131
+ // if (topic === TOPIC_HOME[2] + dataProfile.value?.id) {
132
+ // listConversations.value.unshift(data?.conversations)
133
+ // }
134
+ //
135
+ // if (topic === TOPIC_STATUS_USER + dataProfile.value?.id) {
136
+ // const index = listConversations.value.findIndex(
137
+ // (e) => e.receiver_id == Number(data?.customer_id)
138
+ // )
139
+ // if (index != -1) {
140
+ // listConversations.value[index].status = data.is_online ? 1 : 0
141
+ // }
142
+ // }
143
+ // }
144
+ //
145
+ // const getDataMqtt = useDebounce(() => {
146
+ // getData(undefined, { hideLoading: true, reset: true })
147
+ // }, 5000)
148
+ //
122
149
  const getData = async (data, option) => {
123
150
  try {
124
151
  if (!option?.hideLoading)
125
152
  isLoadingSearch.value = true;
126
- params.value = { ...params.value, ...(data ?? {}) };
127
- const res = await getConversation(params.value);
128
- if (option?.reset) {
129
- listConversations.value = [];
130
- listConversations.value.push(digibotData);
131
- await nextTick();
153
+ // params.value = { ...params.value, ...(data ?? {}) }
154
+ // const res = await getConversation({ ...params.value, is_unknown: activeTabs.value })
155
+ // if (option?.reset) {
156
+ // listConversations.value = []
157
+ // listConversations.value.push(digibotData)
158
+ // await nextTick()
159
+ // }
160
+ // listConversations.value.push(...(res?.items ?? []))
161
+ // params.value.page = res?._meta?.currentPage || 1
162
+ // pageCount = res?._meta?.pageCount || 1
163
+ if (activeTabs.value == TAB_VALUE.ALL) {
164
+ await getDataAll(data, option);
165
+ }
166
+ else if (activeTabs.value == TAB_VALUE.UNKNOWN) {
167
+ await getDataUnknown(data, option);
132
168
  }
133
- listConversations.value.push(...(res?.items ?? []));
134
169
  checkHasReceiveId();
135
- params.value.page = res?._meta?.currentPage || 1;
136
- pageCount = res?._meta?.pageCount || 1;
137
170
  if (option?.reset) {
138
171
  getAllList();
139
172
  }
@@ -146,16 +179,27 @@ const getData = async (data, option) => {
146
179
  }
147
180
  };
148
181
  const getAllList = async () => {
149
- while (params.value.page < pageCount && !scrollEventRef.value?.canScroll()) {
150
- let page = params.value.page + 1;
151
- await getData({ page });
182
+ if (activeTabs.value == TAB_VALUE.ALL) {
183
+ while (paramsAll.value.page < pageCountAll && !scrollEventRef.value?.canScroll()) {
184
+ let page = paramsAll.value.page + 1;
185
+ await getData({ page });
186
+ }
187
+ }
188
+ else if (activeTabs.value == TAB_VALUE.UNKNOWN) {
189
+ while (paramsUnknown.value.page < pageCountUnknown && !scrollEventRef.value?.canScroll()) {
190
+ let page = paramsUnknown.value.page + 1;
191
+ await getData({ page });
192
+ }
152
193
  }
153
194
  };
154
195
  const checkHasReceiveId = () => {
155
196
  const hasReceiveId = listConversations.value?.some((e) => e.receiver_id === receiver_id.value && receiver_id.value);
156
197
  if (props.responsive == 'tablet') {
157
- if (!hasReceiveId && listConversations.value?.length)
158
- emit('selectReceiver', listConversations.value[0]);
198
+ if (!hasReceiveId) {
199
+ if (listConversations.value?.length) {
200
+ emit('selectReceiver', listConversations.value[0]);
201
+ }
202
+ }
159
203
  }
160
204
  };
161
205
  const handleSearch = (value) => {
@@ -163,34 +207,65 @@ const handleSearch = (value) => {
163
207
  getData({ search: value }, { reset: true });
164
208
  };
165
209
  const handleScroll = useDebounce(async () => {
166
- if (params.value.page >= pageCount) {
210
+ if (activeTabs.value == TAB_VALUE.ALL) {
211
+ if (paramsAll.value.page >= pageCountAll) {
212
+ scrollEventRef.value?.hideLoading();
213
+ return;
214
+ }
215
+ let page = paramsAll.value.page + 1;
216
+ await getData({ page });
217
+ scrollEventRef.value?.hideLoading();
218
+ }
219
+ else if (activeTabs.value == TAB_VALUE.UNKNOWN) {
220
+ if (paramsUnknown.value.page >= pageCountUnknown) {
221
+ scrollEventRef.value?.hideLoading();
222
+ return;
223
+ }
224
+ let page = paramsUnknown.value.page + 1;
225
+ await getData({ page });
167
226
  scrollEventRef.value?.hideLoading();
168
- return;
169
227
  }
170
- let page = params.value.page + 1;
171
- await getData({ page });
172
- scrollEventRef.value?.hideLoading();
173
228
  }, 200);
174
229
  const selectUser = (user) => {
175
230
  emit('selectReceiver', user);
176
231
  };
177
232
  const handleReadMessage = () => {
178
- const index = listConversations.value.findIndex((e) => e.receiver_id == receiver_id.value);
179
- if (index > -1) {
180
- if (listConversations.value[index].unread_count) {
181
- readMessages(listConversations.value[index].id);
182
- listConversations.value[index].unread_count = 0;
183
- }
233
+ if (activeTabs.value == TAB_VALUE.ALL) {
234
+ handleReadMessageAll(receiver_id.value);
184
235
  }
236
+ else if (activeTabs.value == TAB_VALUE.UNKNOWN) {
237
+ handleReadMessageUnknown(receiver_id.value);
238
+ }
239
+ // const index = listConversations.value.findIndex((e) => e.receiver_id == receiver_id.value)
240
+ // if (index > -1) {
241
+ // if (listConversations.value[index].unread_count) {
242
+ // readMessages(listConversations.value[index].id)
243
+ // listConversations.value[index].unread_count = 0
244
+ // }
245
+ // }
185
246
  };
247
+ //
186
248
  const getTimeFromNow = (data) => {
187
249
  if (data && dayjs(data).isValid()) {
188
250
  return dayjs.tz(data, TIME_ZONE_UTC).local().fromNow();
189
251
  }
190
252
  return data ?? '';
191
253
  };
192
- getData({}, { reset: true });
193
- const __VLS_exposed = { handleReadMessage, listConversations };
254
+ const handleTabChange = async (tab) => {
255
+ if (tab == TAB_VALUE.ALL && !listConversationsAll.value?.length) {
256
+ await getData({}, { reset: true });
257
+ }
258
+ else if (tab == TAB_VALUE.UNKNOWN && !listConversationsUnknown.value?.length) {
259
+ await getData({}, { reset: true });
260
+ }
261
+ checkHasReceiveId();
262
+ };
263
+ const getCurrentConversation = () => {
264
+ return listConversations.value?.find(user => user.receiver_id == receiver_id.value);
265
+ };
266
+ // getData({}, { reset: true })
267
+ handleTabChange(TAB_VALUE.ALL);
268
+ const __VLS_exposed = { handleReadMessage, listConversationsAll, getCurrentConversation };
194
269
  defineExpose(__VLS_exposed);
195
270
  debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
196
271
  const __VLS_modelEmit = defineEmits();
@@ -209,7 +284,7 @@ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
209
284
  ...{ class: "h-full flex flex-col chat-box-white pt-6" },
210
285
  });
211
286
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
212
- ...{ class: "shrink-0 w-full px-6 flex gap-2 mb-6" },
287
+ ...{ class: "shrink-0 w-full px-6 flex gap-2 mb-4" },
213
288
  });
214
289
  /** @type {[typeof InputSearch, ]} */ ;
215
290
  // @ts-ignore
@@ -243,40 +318,55 @@ const __VLS_7 = __VLS_asFunctionalComponent(IconPlus, new IconPlus({
243
318
  const __VLS_8 = __VLS_7({
244
319
  ...{ class: "text-[#004AB3]" },
245
320
  }, ...__VLS_functionalComponentArgsRest(__VLS_7));
321
+ if (__VLS_ctx.dataProfile?.user_type == 'tenant') {
322
+ // @ts-ignore
323
+ [dataProfile,];
324
+ /** @type {[typeof TabBase, ]} */ ;
325
+ // @ts-ignore
326
+ const __VLS_11 = __VLS_asFunctionalComponent(TabBase, new TabBase({
327
+ ...{ 'onChange': {} },
328
+ ...{ class: "shrink-0 px-6" },
329
+ tabs: (__VLS_ctx.tabs),
330
+ active: (__VLS_ctx.activeTabs),
331
+ }));
332
+ const __VLS_12 = __VLS_11({
333
+ ...{ 'onChange': {} },
334
+ ...{ class: "shrink-0 px-6" },
335
+ tabs: (__VLS_ctx.tabs),
336
+ active: (__VLS_ctx.activeTabs),
337
+ }, ...__VLS_functionalComponentArgsRest(__VLS_11));
338
+ let __VLS_14;
339
+ let __VLS_15;
340
+ const __VLS_16 = ({ change: {} },
341
+ { onChange: (__VLS_ctx.handleTabChange) });
342
+ // @ts-ignore
343
+ [tabs, activeTabs, handleTabChange,];
344
+ var __VLS_13;
345
+ }
246
346
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
247
347
  ...{ class: "grow relative overflow-hidden" },
248
348
  });
249
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
250
- ...{ class: "absolute sc-full flex-center bg-black/10" },
251
- });
252
- __VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.isLoadingSearch) }, null, null);
253
- // @ts-ignore
254
- [isLoadingSearch,];
255
- /** @type {[typeof BaseSpin, ]} */ ;
256
- // @ts-ignore
257
- const __VLS_11 = __VLS_asFunctionalComponent(BaseSpin, new BaseSpin({}));
258
- const __VLS_12 = __VLS_11({}, ...__VLS_functionalComponentArgsRest(__VLS_11));
259
349
  /** @type {[typeof ScrollEvent, typeof ScrollEvent, ]} */ ;
260
350
  // @ts-ignore
261
- const __VLS_15 = __VLS_asFunctionalComponent(ScrollEvent, new ScrollEvent({
351
+ const __VLS_18 = __VLS_asFunctionalComponent(ScrollEvent, new ScrollEvent({
262
352
  ...{ 'onGetDataBottom': {} },
263
353
  ref: "scrollEventRef",
264
354
  ...{ class: "h-full overflow-auto" },
265
355
  bottom: true,
266
356
  }));
267
- const __VLS_16 = __VLS_15({
357
+ const __VLS_19 = __VLS_18({
268
358
  ...{ 'onGetDataBottom': {} },
269
359
  ref: "scrollEventRef",
270
360
  ...{ class: "h-full overflow-auto" },
271
361
  bottom: true,
272
- }, ...__VLS_functionalComponentArgsRest(__VLS_15));
273
- let __VLS_18;
274
- let __VLS_19;
275
- const __VLS_20 = ({ getDataBottom: {} },
362
+ }, ...__VLS_functionalComponentArgsRest(__VLS_18));
363
+ let __VLS_21;
364
+ let __VLS_22;
365
+ const __VLS_23 = ({ getDataBottom: {} },
276
366
  { onGetDataBottom: (__VLS_ctx.handleScroll) });
277
367
  /** @type {typeof __VLS_ctx.scrollEventRef} */ ;
278
- var __VLS_21 = {};
279
- const { default: __VLS_23 } = __VLS_17.slots;
368
+ var __VLS_24 = {};
369
+ const { default: __VLS_26 } = __VLS_20.slots;
280
370
  // @ts-ignore
281
371
  [handleScroll, scrollEventRef,];
282
372
  for (const [user] of __VLS_getVForSourceType((__VLS_ctx.listConversations))) {
@@ -299,20 +389,20 @@ for (const [user] of __VLS_getVForSourceType((__VLS_ctx.listConversations))) {
299
389
  [responsive, receiver_id,];
300
390
  /** @type {[typeof Avatar, ]} */ ;
301
391
  // @ts-ignore
302
- const __VLS_24 = __VLS_asFunctionalComponent(Avatar, new Avatar({
392
+ const __VLS_27 = __VLS_asFunctionalComponent(Avatar, new Avatar({
303
393
  id: (user.id),
304
394
  ...{ class: "shrink-0" },
305
395
  src: (user.avatar ?? ''),
306
396
  color: (user.color),
307
397
  name: (user.username ?? ''),
308
398
  }));
309
- const __VLS_25 = __VLS_24({
399
+ const __VLS_28 = __VLS_27({
310
400
  id: (user.id),
311
401
  ...{ class: "shrink-0" },
312
402
  src: (user.avatar ?? ''),
313
403
  color: (user.color),
314
404
  name: (user.username ?? ''),
315
- }, ...__VLS_functionalComponentArgsRest(__VLS_24));
405
+ }, ...__VLS_functionalComponentArgsRest(__VLS_27));
316
406
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
317
407
  ...{ class: "grow ml-3 overflow-hidden" },
318
408
  });
@@ -334,12 +424,12 @@ for (const [user] of __VLS_getVForSourceType((__VLS_ctx.listConversations))) {
334
424
  [digibotId,];
335
425
  /** @type {[typeof IconAiCheck, ]} */ ;
336
426
  // @ts-ignore
337
- const __VLS_28 = __VLS_asFunctionalComponent(IconAiCheck, new IconAiCheck({
427
+ const __VLS_31 = __VLS_asFunctionalComponent(IconAiCheck, new IconAiCheck({
338
428
  ...{ class: "ml-2" },
339
429
  }));
340
- const __VLS_29 = __VLS_28({
430
+ const __VLS_32 = __VLS_31({
341
431
  ...{ class: "ml-2" },
342
- }, ...__VLS_functionalComponentArgsRest(__VLS_28));
432
+ }, ...__VLS_functionalComponentArgsRest(__VLS_31));
343
433
  }
344
434
  if (user.unread_count) {
345
435
  __VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
@@ -362,7 +452,7 @@ for (const [user] of __VLS_getVForSourceType((__VLS_ctx.listConversations))) {
362
452
  // @ts-ignore
363
453
  [getTimeFromNow,];
364
454
  }
365
- var __VLS_17;
455
+ var __VLS_20;
366
456
  /** @type {__VLS_StyleScopedClasses['']} */ ;
367
457
  /** @type {__VLS_StyleScopedClasses['h-full']} */ ;
368
458
  /** @type {__VLS_StyleScopedClasses['flex']} */ ;
@@ -374,7 +464,7 @@ var __VLS_17;
374
464
  /** @type {__VLS_StyleScopedClasses['px-6']} */ ;
375
465
  /** @type {__VLS_StyleScopedClasses['flex']} */ ;
376
466
  /** @type {__VLS_StyleScopedClasses['gap-2']} */ ;
377
- /** @type {__VLS_StyleScopedClasses['mb-6']} */ ;
467
+ /** @type {__VLS_StyleScopedClasses['mb-4']} */ ;
378
468
  /** @type {__VLS_StyleScopedClasses['h-[45px]']} */ ;
379
469
  /** @type {__VLS_StyleScopedClasses['grow']} */ ;
380
470
  /** @type {__VLS_StyleScopedClasses['h-[45px]']} */ ;
@@ -383,13 +473,11 @@ var __VLS_17;
383
473
  /** @type {__VLS_StyleScopedClasses['flex-center']} */ ;
384
474
  /** @type {__VLS_StyleScopedClasses['bg-[#C7DEFF]']} */ ;
385
475
  /** @type {__VLS_StyleScopedClasses['text-[#004AB3]']} */ ;
476
+ /** @type {__VLS_StyleScopedClasses['shrink-0']} */ ;
477
+ /** @type {__VLS_StyleScopedClasses['px-6']} */ ;
386
478
  /** @type {__VLS_StyleScopedClasses['grow']} */ ;
387
479
  /** @type {__VLS_StyleScopedClasses['relative']} */ ;
388
480
  /** @type {__VLS_StyleScopedClasses['overflow-hidden']} */ ;
389
- /** @type {__VLS_StyleScopedClasses['absolute']} */ ;
390
- /** @type {__VLS_StyleScopedClasses['sc-full']} */ ;
391
- /** @type {__VLS_StyleScopedClasses['flex-center']} */ ;
392
- /** @type {__VLS_StyleScopedClasses['bg-black/10']} */ ;
393
481
  /** @type {__VLS_StyleScopedClasses['h-full']} */ ;
394
482
  /** @type {__VLS_StyleScopedClasses['overflow-auto']} */ ;
395
483
  /** @type {__VLS_StyleScopedClasses['w-full']} */ ;
@@ -432,7 +520,7 @@ var __VLS_17;
432
520
  /** @type {__VLS_StyleScopedClasses['text-chat-gray-4']} */ ;
433
521
  /** @type {__VLS_StyleScopedClasses['w-[130px]']} */ ;
434
522
  // @ts-ignore
435
- var __VLS_22 = __VLS_21;
523
+ var __VLS_25 = __VLS_24;
436
524
  const __VLS_export = (await import('vue')).defineComponent({
437
525
  setup: () => (__VLS_exposed),
438
526
  __typeEmits: {},