@phonghq/go-chat 1.0.22 → 1.0.24

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