@phonghq/go-chat 1.0.4 → 1.0.6

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 (296) hide show
  1. package/dist/assets/icons/IconArrowLeft.vue.d.ts +2 -0
  2. package/dist/assets/icons/IconPhone.vue.d.ts +2 -0
  3. package/dist/assets/icons/IconPlan.vue.d.ts +2 -0
  4. package/dist/assets/icons/IconPlus.vue.d.ts +2 -0
  5. package/dist/assets/icons/IconSearch.vue.d.ts +32 -0
  6. package/dist/assets/icons/call/IconMic.vue.d.ts +14 -0
  7. package/dist/assets/icons/call/IconPhone.vue.d.ts +2 -0
  8. package/dist/assets/icons/call/IconPhoneCancel.vue.d.ts +2 -0
  9. package/dist/assets/icons/call/IconSpeaker.vue.d.ts +14 -0
  10. package/dist/assets/icons/customer-appointment/IconFilter.vue.d.ts +2 -0
  11. package/dist/assets/icons/customer-detail/IconArrow.vue.d.ts +2 -0
  12. package/dist/assets/icons/customer-detail/IconCheck.vue.d.ts +2 -0
  13. package/dist/assets/icons/customer-detail/IconDate.vue.d.ts +2 -0
  14. package/dist/assets/icons/customer-detail/IconGroup.vue.d.ts +2 -0
  15. package/dist/assets/icons/customer-detail/IconMessage.vue.d.ts +2 -0
  16. package/dist/assets/icons/customer-detail/IconNote.vue.d.ts +2 -0
  17. package/dist/assets/icons/customer-detail/IconPhone.vue.d.ts +2 -0
  18. package/dist/assets/icons/customer-detail/IconPin.vue.d.ts +2 -0
  19. package/dist/assets/icons/customer-detail/IconSearch.vue.d.ts +2 -0
  20. package/dist/chat/App.vue.d.ts +5 -0
  21. package/dist/chat/main.d.ts +6 -0
  22. package/dist/chat/page/customer-appointment/CustomerAppointment.vue.d.ts +2 -0
  23. package/dist/chat/page/customer-check-in/CollapseCheckIn.vue.d.ts +12 -0
  24. package/dist/chat/page/customer-check-in/CustomerCheckIn.vue.d.ts +2 -0
  25. package/dist/chat/page/customer-detail/CustomerDetail.vue.d.ts +7 -0
  26. package/dist/chat/page/customer-detail/SubInformation.vue.d.ts +16 -0
  27. package/dist/chat/page/error/Error.vue.d.ts +2 -0
  28. package/dist/chat/page/home/ChatList.vue.d.ts +20 -0
  29. package/dist/chat/page/home/ChatMessage.vue.d.ts +17 -0
  30. package/dist/chat/page/home/Home.vue.d.ts +14 -0
  31. package/dist/chat/page/home/HomeHeader.vue.d.ts +10 -0
  32. package/dist/chat/page/home/InputChat.vue.d.ts +19 -0
  33. package/dist/chat/page/home/NewCustomer.vue.d.ts +6 -0
  34. package/dist/components/ListenEvent.vue.d.ts +2 -0
  35. package/dist/components/chat/ScrollEvent/ScrollEvent.vue.d.ts +22 -0
  36. package/dist/components/chat/call/Calling.vue.d.ts +7 -0
  37. package/dist/components/chat/card/CardCustomerDetail.vue.d.ts +13 -0
  38. package/dist/components/chat/common/collapse/CollapseBase.vue.d.ts +20 -0
  39. package/dist/components/chat/common/input/InputSearch.vue.d.ts +16 -0
  40. package/dist/components/chat/common/popover/PopoverBase.vue.d.ts +35 -0
  41. package/dist/components/chat/common/spin/BaseSpin.vue.d.ts +2 -0
  42. package/dist/components/chat/customer/Avatar.vue.d.ts +12 -0
  43. package/dist/components/chat/layout/mobile/Footer.vue.d.ts +2 -0
  44. package/dist/components/common/CustomLoading.vue.d.ts +2 -0
  45. package/dist/components/common/Notification/NotificationDescription.vue.d.ts +7 -0
  46. package/dist/components/common/button/ButtonBase.vue.d.ts +22 -0
  47. package/dist/components/common/button/ButtonToggle.vue.d.ts +20 -0
  48. package/dist/components/common/checkbox/CCheckboxNumber.vue.d.ts +16 -0
  49. package/dist/components/common/collapse/BaseCollapse.vue.d.ts +12 -0
  50. package/dist/components/common/collapse/BaseCollapseItem.vue.d.ts +4 -0
  51. package/dist/components/common/drawer/DrawerBase.vue.d.ts +39 -0
  52. package/dist/components/common/dropdown/DropdownBase.vue.d.ts +21 -0
  53. package/dist/components/common/input/CInputSearch.vue.d.ts +14 -0
  54. package/dist/components/common/modal/ModalBase.vue.d.ts +35 -0
  55. package/dist/components/common/popover/PopoverBase.vue.d.ts +3 -0
  56. package/dist/components/common/slider/BaseSlider.vue.d.ts +11 -0
  57. package/dist/components/common/spin/CSpin.vue.d.ts +9 -0
  58. package/dist/components/common/tooltip/TooltipBase.vue.d.ts +2 -0
  59. package/dist/components/layout/Blank.vue.d.ts +9 -0
  60. package/dist/components/layout/Default.vue.d.ts +9 -0
  61. package/dist/components/modal/Confirm.vue.d.ts +2 -0
  62. package/dist/components/ui/button/CButton.vue.d.ts +19 -0
  63. package/dist/components/ui/button/c-button.d.ts +7 -0
  64. package/dist/components/ui/checkbox/Checkbox.vue.d.ts +18 -0
  65. package/dist/components/ui/checkbox/index.d.ts +1 -0
  66. package/dist/components/ui/collapsible/Collapsible.vue.d.ts +16 -0
  67. package/dist/components/ui/collapsible/CollapsibleContent.vue.d.ts +10 -0
  68. package/dist/components/ui/collapsible/CollapsibleTrigger.vue.d.ts +10 -0
  69. package/dist/components/ui/collapsible/index.d.ts +3 -0
  70. package/dist/components/ui/dialog/Dialog.vue.d.ts +14 -0
  71. package/dist/components/ui/dialog/DialogClose.vue.d.ts +10 -0
  72. package/dist/components/ui/dialog/DialogContent.vue.d.ts +29 -0
  73. package/dist/components/ui/dialog/DialogDescription.vue.d.ts +14 -0
  74. package/dist/components/ui/dialog/DialogFooter.vue.d.ts +13 -0
  75. package/dist/components/ui/dialog/DialogHeader.vue.d.ts +13 -0
  76. package/dist/components/ui/dialog/DialogScrollContent.vue.d.ts +30 -0
  77. package/dist/components/ui/dialog/DialogTitle.vue.d.ts +14 -0
  78. package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +10 -0
  79. package/dist/components/ui/dialog/index.d.ts +9 -0
  80. package/dist/components/ui/drawer/Drawer.vue.d.ts +26 -0
  81. package/dist/components/ui/drawer/DrawerContent.vue.d.ts +33 -0
  82. package/dist/components/ui/drawer/DrawerDescription.vue.d.ts +14 -0
  83. package/dist/components/ui/drawer/DrawerFooter.vue.d.ts +13 -0
  84. package/dist/components/ui/drawer/DrawerHeader.vue.d.ts +13 -0
  85. package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts +7 -0
  86. package/dist/components/ui/drawer/DrawerTitle.vue.d.ts +14 -0
  87. package/dist/components/ui/drawer/index.d.ts +8 -0
  88. package/dist/components/ui/dropdown-menu/DropdownMenu.vue.d.ts +14 -0
  89. package/dist/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +20 -0
  90. package/dist/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +28 -0
  91. package/dist/components/ui/dropdown-menu/DropdownMenuGroup.vue.d.ts +10 -0
  92. package/dist/components/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +15 -0
  93. package/dist/components/ui/dropdown-menu/DropdownMenuLabel.vue.d.ts +15 -0
  94. package/dist/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.d.ts +14 -0
  95. package/dist/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.d.ts +18 -0
  96. package/dist/components/ui/dropdown-menu/DropdownMenuSeparator.vue.d.ts +7 -0
  97. package/dist/components/ui/dropdown-menu/DropdownMenuShortcut.vue.d.ts +13 -0
  98. package/dist/components/ui/dropdown-menu/DropdownMenuSub.vue.d.ts +14 -0
  99. package/dist/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +30 -0
  100. package/dist/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +14 -0
  101. package/dist/components/ui/dropdown-menu/DropdownMenuTrigger.vue.d.ts +10 -0
  102. package/dist/components/ui/dropdown-menu/index.d.ts +15 -0
  103. package/dist/components/ui/popover/Popover.vue.d.ts +14 -0
  104. package/dist/components/ui/popover/PopoverContent.vue.d.ts +28 -0
  105. package/dist/components/ui/popover/PopoverTrigger.vue.d.ts +10 -0
  106. package/dist/components/ui/popover/index.d.ts +3 -0
  107. package/dist/components/ui/radio-group/RadioGroup.vue.d.ts +18 -0
  108. package/dist/components/ui/radio-group/RadioGroupItem.vue.d.ts +7 -0
  109. package/dist/components/ui/radio-group/index.d.ts +2 -0
  110. package/dist/components/ui/slider/Slider.vue.d.ts +13 -0
  111. package/dist/components/ui/slider/index.d.ts +1 -0
  112. package/dist/components/ui/switch/Switch.vue.d.ts +18 -0
  113. package/dist/components/ui/switch/index.d.ts +1 -0
  114. package/dist/composable/useCallHelper.d.ts +23 -0
  115. package/dist/composable/useDigibot.d.ts +7 -0
  116. package/dist/composable/useInitData.d.ts +11 -0
  117. package/dist/composable/useModalConfirm.d.ts +5 -0
  118. package/dist/constant/color.d.ts +22 -0
  119. package/dist/constant/datetime.d.ts +5 -0
  120. package/dist/constant/general.d.ts +8 -0
  121. package/dist/constant/message.d.ts +8 -0
  122. package/dist/constant/mqtt.d.ts +4 -0
  123. package/dist/constant/user.d.ts +8 -0
  124. package/dist/lib/utils.d.ts +2 -0
  125. package/dist/plugins/axios-gci.d.ts +3 -0
  126. package/dist/plugins/axios.d.ts +3 -0
  127. package/dist/plugins/mqtt.d.ts +10 -0
  128. package/dist/plugins/sdk.d.ts +19 -0
  129. package/dist/plugins/websocket.d.ts +4 -0
  130. package/dist/style.css +1 -1
  131. package/dist/test/assets/icons/IconArrowLeft.vue.js +29 -0
  132. package/dist/test/assets/icons/IconPhone.vue.js +19 -0
  133. package/dist/test/assets/icons/IconPlan.vue.js +19 -0
  134. package/dist/test/assets/icons/IconPlus.vue.js +22 -0
  135. package/dist/test/assets/icons/IconSearch.vue.js +68 -0
  136. package/dist/test/assets/icons/call/IconMic.vue.js +123 -0
  137. package/dist/test/assets/icons/call/IconPhone.vue.js +35 -0
  138. package/dist/test/assets/icons/call/IconPhoneCancel.vue.js +35 -0
  139. package/dist/test/assets/icons/call/IconSpeaker.vue.js +62 -0
  140. package/dist/test/assets/icons/customer-appointment/IconFilter.vue.js +53 -0
  141. package/dist/test/assets/icons/customer-detail/IconArrow.vue.js +22 -0
  142. package/dist/test/assets/icons/customer-detail/IconCheck.vue.js +27 -0
  143. package/dist/test/assets/icons/customer-detail/IconDate.vue.js +43 -0
  144. package/dist/test/assets/icons/customer-detail/IconGroup.vue.js +48 -0
  145. package/dist/test/assets/icons/customer-detail/IconMessage.vue.js +28 -0
  146. package/dist/test/assets/icons/customer-detail/IconNote.vue.js +29 -0
  147. package/dist/test/assets/icons/customer-detail/IconPhone.vue.js +21 -0
  148. package/dist/test/assets/icons/customer-detail/IconPin.vue.js +29 -0
  149. package/dist/test/assets/icons/customer-detail/IconSearch.vue.js +29 -0
  150. package/dist/test/chat/App.vue.js +502 -0
  151. package/dist/test/chat/main.js +6 -0
  152. package/dist/test/chat/page/customer-appointment/CustomerAppointment.vue.js +207 -0
  153. package/dist/test/chat/page/customer-check-in/CollapseCheckIn.vue.js +80 -0
  154. package/dist/test/chat/page/customer-check-in/CustomerCheckIn.vue.js +136 -0
  155. package/dist/test/chat/page/customer-detail/CustomerDetail.vue.js +235 -0
  156. package/dist/test/chat/page/customer-detail/SubInformation.vue.js +102 -0
  157. package/dist/test/chat/page/error/Error.vue.js +64 -0
  158. package/dist/test/chat/page/home/ChatList.vue.js +387 -0
  159. package/dist/test/chat/page/home/ChatMessage.vue.js +295 -0
  160. package/dist/test/chat/page/home/Home.vue.js +332 -0
  161. package/dist/test/chat/page/home/HomeHeader.vue.js +127 -0
  162. package/dist/test/chat/page/home/InputChat.vue.js +255 -0
  163. package/dist/test/chat/page/home/NewCustomer.vue.js +84 -0
  164. package/dist/test/components/ListenEvent.vue.js +45 -0
  165. package/dist/test/components/chat/ScrollEvent/ScrollEvent.vue.js +197 -0
  166. package/dist/test/components/chat/call/Calling.vue.js +291 -0
  167. package/dist/test/components/chat/card/CardCustomerDetail.vue.js +28 -0
  168. package/dist/test/components/chat/common/collapse/CollapseBase.vue.js +59 -0
  169. package/dist/test/components/chat/common/input/InputSearch.vue.js +71 -0
  170. package/dist/test/components/chat/common/popover/PopoverBase.vue.js +148 -0
  171. package/dist/test/components/chat/common/spin/BaseSpin.vue.js +12 -0
  172. package/dist/test/components/chat/customer/Avatar.vue.js +101 -0
  173. package/dist/test/components/chat/layout/mobile/Footer.vue.js +109 -0
  174. package/dist/test/components/common/CustomLoading.vue.js +19 -0
  175. package/dist/test/components/common/Notification/NotificationDescription.vue.js +38 -0
  176. package/dist/test/components/common/button/ButtonBase.vue.js +78 -0
  177. package/dist/test/components/common/button/ButtonToggle.vue.js +70 -0
  178. package/dist/test/components/common/checkbox/CCheckboxNumber.vue.js +48 -0
  179. package/dist/test/components/common/collapse/BaseCollapse.vue.js +36 -0
  180. package/dist/test/components/common/collapse/BaseCollapseItem.vue.js +22 -0
  181. package/dist/test/components/common/drawer/DrawerBase.vue.js +126 -0
  182. package/dist/test/components/common/dropdown/DropdownBase.vue.js +91 -0
  183. package/dist/test/components/common/input/CInputSearch.vue.js +62 -0
  184. package/dist/test/components/common/modal/ModalBase.vue.js +164 -0
  185. package/dist/test/components/common/popover/PopoverBase.vue.js +36 -0
  186. package/dist/test/components/common/slider/BaseSlider.vue.js +70 -0
  187. package/dist/test/components/common/spin/CSpin.vue.js +41 -0
  188. package/dist/test/components/common/tooltip/TooltipBase.vue.js +8 -0
  189. package/dist/test/components/layout/Blank.vue.js +19 -0
  190. package/dist/test/components/layout/Default.vue.js +21 -0
  191. package/dist/test/components/modal/Confirm.vue.js +164 -0
  192. package/dist/test/components/ui/button/CButton.vue.js +49 -0
  193. package/dist/test/components/ui/button/c-button.js +26 -0
  194. package/dist/test/components/ui/checkbox/Checkbox.vue.js +79 -0
  195. package/dist/test/components/ui/checkbox/index.js +1 -0
  196. package/dist/test/components/ui/collapsible/Collapsible.vue.js +47 -0
  197. package/dist/test/components/ui/collapsible/CollapsibleContent.vue.js +41 -0
  198. package/dist/test/components/ui/collapsible/CollapsibleTrigger.vue.js +35 -0
  199. package/dist/test/components/ui/collapsible/index.js +3 -0
  200. package/dist/test/components/ui/dialog/Dialog.vue.js +42 -0
  201. package/dist/test/components/ui/dialog/DialogClose.vue.js +35 -0
  202. package/dist/test/components/ui/dialog/DialogContent.vue.js +84 -0
  203. package/dist/test/components/ui/dialog/DialogDescription.vue.js +43 -0
  204. package/dist/test/components/ui/dialog/DialogFooter.vue.js +26 -0
  205. package/dist/test/components/ui/dialog/DialogHeader.vue.js +26 -0
  206. package/dist/test/components/ui/dialog/DialogScrollContent.vue.js +99 -0
  207. package/dist/test/components/ui/dialog/DialogTitle.vue.js +43 -0
  208. package/dist/test/components/ui/dialog/DialogTrigger.vue.js +35 -0
  209. package/dist/test/components/ui/dialog/index.js +9 -0
  210. package/dist/test/components/ui/drawer/Drawer.vue.js +48 -0
  211. package/dist/test/components/ui/drawer/DrawerContent.vue.js +81 -0
  212. package/dist/test/components/ui/drawer/DrawerDescription.vue.js +42 -0
  213. package/dist/test/components/ui/drawer/DrawerFooter.vue.js +26 -0
  214. package/dist/test/components/ui/drawer/DrawerHeader.vue.js +26 -0
  215. package/dist/test/components/ui/drawer/DrawerOverlay.vue.js +37 -0
  216. package/dist/test/components/ui/drawer/DrawerTitle.vue.js +42 -0
  217. package/dist/test/components/ui/drawer/index.js +8 -0
  218. package/dist/test/components/ui/dropdown-menu/DropdownMenu.vue.js +41 -0
  219. package/dist/test/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.js +79 -0
  220. package/dist/test/components/ui/dropdown-menu/DropdownMenuContent.vue.js +61 -0
  221. package/dist/test/components/ui/dropdown-menu/DropdownMenuGroup.vue.js +35 -0
  222. package/dist/test/components/ui/dropdown-menu/DropdownMenuItem.vue.js +43 -0
  223. package/dist/test/components/ui/dropdown-menu/DropdownMenuLabel.vue.js +43 -0
  224. package/dist/test/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.js +41 -0
  225. package/dist/test/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.js +80 -0
  226. package/dist/test/components/ui/dropdown-menu/DropdownMenuSeparator.vue.js +37 -0
  227. package/dist/test/components/ui/dropdown-menu/DropdownMenuShortcut.vue.js +26 -0
  228. package/dist/test/components/ui/dropdown-menu/DropdownMenuSub.vue.js +41 -0
  229. package/dist/test/components/ui/dropdown-menu/DropdownMenuSubContent.vue.js +46 -0
  230. package/dist/test/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.js +58 -0
  231. package/dist/test/components/ui/dropdown-menu/DropdownMenuTrigger.vue.js +41 -0
  232. package/dist/test/components/ui/dropdown-menu/index.js +15 -0
  233. package/dist/test/components/ui/popover/Popover.vue.js +41 -0
  234. package/dist/test/components/ui/popover/PopoverContent.vue.js +60 -0
  235. package/dist/test/components/ui/popover/PopoverTrigger.vue.js +35 -0
  236. package/dist/test/components/ui/popover/index.js +3 -0
  237. package/dist/test/components/ui/radio-group/RadioGroup.vue.js +46 -0
  238. package/dist/test/components/ui/radio-group/RadioGroupItem.vue.js +71 -0
  239. package/dist/test/components/ui/radio-group/index.js +2 -0
  240. package/dist/test/components/ui/slider/Slider.vue.js +155 -0
  241. package/dist/test/components/ui/slider/index.js +1 -0
  242. package/dist/test/components/ui/switch/Switch.vue.js +61 -0
  243. package/dist/test/components/ui/switch/index.js +1 -0
  244. package/dist/test/composable/useCallHelper.js +170 -0
  245. package/dist/test/composable/useDigibot.js +22 -0
  246. package/dist/test/composable/useInitData.js +84 -0
  247. package/dist/test/composable/useModalConfirm.js +39 -0
  248. package/dist/test/constant/color.js +43 -0
  249. package/dist/test/constant/datetime.js +5 -0
  250. package/dist/test/constant/general.js +9 -0
  251. package/dist/test/constant/message.js +8 -0
  252. package/dist/test/constant/mqtt.js +11 -0
  253. package/dist/test/constant/user.js +9 -0
  254. package/dist/test/lib/utils.js +5 -0
  255. package/dist/test/plugins/axios-gci.js +25 -0
  256. package/dist/test/plugins/axios.js +85 -0
  257. package/dist/test/plugins/mqtt.js +128 -0
  258. package/dist/test/plugins/sdk.js +83 -0
  259. package/dist/test/plugins/websocket.js +65 -0
  260. package/dist/test/types/call.js +1 -0
  261. package/dist/test/types/chat/auth.js +1 -0
  262. package/dist/test/types/chat/global.js +1 -0
  263. package/dist/test/types/chat/promise.js +1 -0
  264. package/dist/test/types/chat/user.js +1 -0
  265. package/dist/test/types/conversation.js +1 -0
  266. package/dist/test/types/global.js +15 -0
  267. package/dist/test/types/message.js +1 -0
  268. package/dist/test/utils/chat/auth.js +51 -0
  269. package/dist/test/utils/chat/call.js +61 -0
  270. package/dist/test/utils/chat/chat-router.js +8 -0
  271. package/dist/test/utils/chat/conversation.js +7 -0
  272. package/dist/test/utils/chat/message.js +42 -0
  273. package/dist/test/utils/chat/user.js +33 -0
  274. package/dist/test/utils/debounce.js +9 -0
  275. package/dist/test/utils/json.js +18 -0
  276. package/dist/test/utils/logger.js +5 -0
  277. package/dist/test/utils/string-helper.js +27 -0
  278. package/dist/types/call.d.ts +4 -0
  279. package/dist/types/chat/auth.d.ts +37 -0
  280. package/dist/types/chat/global.d.ts +7 -0
  281. package/dist/types/chat/promise.d.ts +17 -0
  282. package/dist/types/chat/user.d.ts +88 -0
  283. package/dist/types/conversation.d.ts +18 -0
  284. package/dist/types/global.d.ts +11 -0
  285. package/dist/types/message.d.ts +43 -0
  286. package/dist/utils/chat/auth.d.ts +45 -0
  287. package/dist/utils/chat/call.d.ts +5 -0
  288. package/dist/utils/chat/chat-router.d.ts +3 -0
  289. package/dist/utils/chat/conversation.d.ts +3 -0
  290. package/dist/utils/chat/message.d.ts +17 -0
  291. package/dist/utils/chat/user.d.ts +193 -0
  292. package/dist/utils/debounce.d.ts +1 -0
  293. package/dist/utils/json.d.ts +2 -0
  294. package/dist/utils/logger.d.ts +3 -0
  295. package/dist/utils/string-helper.d.ts +1 -0
  296. package/package.json +1 -1
@@ -0,0 +1,127 @@
1
+ import IconPhone from '../../../assets/icons/IconPhone.vue';
2
+ import { PAGE } from '../../../constant/general';
3
+ import Avatar from '../../../components/chat/customer/Avatar.vue';
4
+ import { routerPush } from '../../../utils/chat/chat-router';
5
+ import { user } from '../../../utils/chat/user';
6
+ import { dataProfile } from '../../../utils/chat/auth';
7
+ import { digibotId } from '../../../composable/useDigibot';
8
+ const props = withDefaults(defineProps(), {});
9
+ const emit = defineEmits();
10
+ const goToViewUser = () => {
11
+ if (props.data?.id == digibotId.toString())
12
+ return;
13
+ if (dataProfile.value?.user_type == 'tenant') {
14
+ user.value = props.data;
15
+ routerPush(PAGE.CUSTOMER_DETAIL);
16
+ }
17
+ };
18
+ debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
19
+ const __VLS_defaults = {};
20
+ const __VLS_ctx = {
21
+ ...{},
22
+ ...{},
23
+ ...{},
24
+ ...{},
25
+ ...{},
26
+ };
27
+ let __VLS_elements;
28
+ let __VLS_components;
29
+ let __VLS_directives;
30
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
31
+ ...{ class: "px-8 pb-4 border-b border-chat-gray-5" },
32
+ });
33
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
34
+ ...{ class: "flex items-center" },
35
+ });
36
+ /** @type {[typeof Avatar, ]} */ ;
37
+ // @ts-ignore
38
+ const __VLS_0 = __VLS_asFunctionalComponent(Avatar, new Avatar({
39
+ ...{ 'onClick': {} },
40
+ ...{ class: ({ 'cursor-pointer': __VLS_ctx.dataProfile?.user_type == 'tenant' }) },
41
+ src: (__VLS_ctx.data?.avatar ?? ''),
42
+ id: (__VLS_ctx.data?.id ?? ''),
43
+ color: (__VLS_ctx.data?.color),
44
+ name: (__VLS_ctx.data?.username),
45
+ }));
46
+ const __VLS_1 = __VLS_0({
47
+ ...{ 'onClick': {} },
48
+ ...{ class: ({ 'cursor-pointer': __VLS_ctx.dataProfile?.user_type == 'tenant' }) },
49
+ src: (__VLS_ctx.data?.avatar ?? ''),
50
+ id: (__VLS_ctx.data?.id ?? ''),
51
+ color: (__VLS_ctx.data?.color),
52
+ name: (__VLS_ctx.data?.username),
53
+ }, ...__VLS_functionalComponentArgsRest(__VLS_0));
54
+ let __VLS_3;
55
+ let __VLS_4;
56
+ const __VLS_5 = ({ click: {} },
57
+ { onClick: (__VLS_ctx.goToViewUser) });
58
+ // @ts-ignore
59
+ [dataProfile, data, data, data, data, goToViewUser,];
60
+ var __VLS_2;
61
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
62
+ ...{ class: "flex-1 ml-3" },
63
+ });
64
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
65
+ ...{ class: "flex justify-between items-center" },
66
+ });
67
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
68
+ ...{ onClick: (__VLS_ctx.goToViewUser) },
69
+ ...{ class: ({ 'cursor-pointer': __VLS_ctx.dataProfile?.user_type == 'tenant' }) },
70
+ });
71
+ // @ts-ignore
72
+ [dataProfile, goToViewUser,];
73
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
74
+ ...{ class: "flex items-center" },
75
+ });
76
+ __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
77
+ ...{ class: "font-semibold" },
78
+ });
79
+ (__VLS_ctx.data?.username ?? 'n/a');
80
+ // @ts-ignore
81
+ [data,];
82
+ __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
83
+ ...{ class: "text-sm text-chat-gray-3 truncate" },
84
+ });
85
+ __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
86
+ ...{ onClick: (...[$event]) => {
87
+ __VLS_ctx.emit('call');
88
+ // @ts-ignore
89
+ [emit,];
90
+ } },
91
+ ...{ class: "flex-center text-[#0051E6] bg-chat-haze-200 w-9 h-9 rounded-lg" },
92
+ });
93
+ /** @type {[typeof IconPhone, ]} */ ;
94
+ // @ts-ignore
95
+ const __VLS_7 = __VLS_asFunctionalComponent(IconPhone, new IconPhone({}));
96
+ const __VLS_8 = __VLS_7({}, ...__VLS_functionalComponentArgsRest(__VLS_7));
97
+ /** @type {__VLS_StyleScopedClasses['px-8']} */ ;
98
+ /** @type {__VLS_StyleScopedClasses['pb-4']} */ ;
99
+ /** @type {__VLS_StyleScopedClasses['border-b']} */ ;
100
+ /** @type {__VLS_StyleScopedClasses['border-chat-gray-5']} */ ;
101
+ /** @type {__VLS_StyleScopedClasses['flex']} */ ;
102
+ /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
103
+ /** @type {__VLS_StyleScopedClasses['cursor-pointer']} */ ;
104
+ /** @type {__VLS_StyleScopedClasses['flex-1']} */ ;
105
+ /** @type {__VLS_StyleScopedClasses['ml-3']} */ ;
106
+ /** @type {__VLS_StyleScopedClasses['flex']} */ ;
107
+ /** @type {__VLS_StyleScopedClasses['justify-between']} */ ;
108
+ /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
109
+ /** @type {__VLS_StyleScopedClasses['cursor-pointer']} */ ;
110
+ /** @type {__VLS_StyleScopedClasses['flex']} */ ;
111
+ /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
112
+ /** @type {__VLS_StyleScopedClasses['font-semibold']} */ ;
113
+ /** @type {__VLS_StyleScopedClasses['text-sm']} */ ;
114
+ /** @type {__VLS_StyleScopedClasses['text-chat-gray-3']} */ ;
115
+ /** @type {__VLS_StyleScopedClasses['truncate']} */ ;
116
+ /** @type {__VLS_StyleScopedClasses['flex-center']} */ ;
117
+ /** @type {__VLS_StyleScopedClasses['text-[#0051E6]']} */ ;
118
+ /** @type {__VLS_StyleScopedClasses['bg-chat-haze-200']} */ ;
119
+ /** @type {__VLS_StyleScopedClasses['w-9']} */ ;
120
+ /** @type {__VLS_StyleScopedClasses['h-9']} */ ;
121
+ /** @type {__VLS_StyleScopedClasses['rounded-lg']} */ ;
122
+ const __VLS_export = (await import('vue')).defineComponent({
123
+ __typeEmits: {},
124
+ __typeProps: {},
125
+ props: {},
126
+ });
127
+ export default {};
@@ -0,0 +1,255 @@
1
+ import IconPlus from '../../../assets/icons/IconPlus.vue';
2
+ import IconPlan from '../../../assets/icons/IconPlan.vue';
3
+ import EmojiPicker from 'vue3-emoji-picker';
4
+ import 'vue3-emoji-picker/css';
5
+ import dayjs from 'dayjs';
6
+ import { DATE_FORMATS } from '../../../constant/datetime';
7
+ import { dataProfile } from '../../../utils/chat/auth';
8
+ import { ref } from 'vue';
9
+ import PopoverBase from '../../../components/chat/common/popover/PopoverBase.vue';
10
+ const props = withDefaults(defineProps(), {});
11
+ const emit = defineEmits();
12
+ const keyword = defineModel();
13
+ let chatId = 1;
14
+ const refInputImage = ref(null);
15
+ const isLoadingImage = ref([]);
16
+ const chatInputRef = ref(null);
17
+ const emojiOpen = ref(false);
18
+ const handleSendMessage = async (type) => {
19
+ const tempId = Date.now();
20
+ let messageContent = '';
21
+ let attachments = [];
22
+ if (type == 'message') {
23
+ if (!keyword.value)
24
+ return;
25
+ messageContent = keyword.value;
26
+ keyword.value = '';
27
+ }
28
+ else if (type == 'file') {
29
+ const file = uploadImage();
30
+ if (!file)
31
+ return;
32
+ const file_path = URL.createObjectURL(file);
33
+ attachments = [{ file_name: String(tempId), file_path, file_local: file }];
34
+ }
35
+ keyword.value = '';
36
+ chatId++;
37
+ const id = props.data?.id.toString() + '-' + chatId;
38
+ const data = {
39
+ conversation_id: 135,
40
+ created_at: dayjs().format(DATE_FORMATS['DATE_FORMAT_FULL']),
41
+ id,
42
+ message: messageContent,
43
+ receiver_id: props.data?.id || 0,
44
+ sender_id: dataProfile.value?.id,
45
+ status: 'read',
46
+ attachments: attachments
47
+ };
48
+ emit('sendMessage', data);
49
+ };
50
+ const uploadImage = () => {
51
+ if (!refInputImage.value ||
52
+ !refInputImage.value.files ||
53
+ refInputImage.value.files.length === 0) {
54
+ return null;
55
+ }
56
+ return refInputImage.value.files[0];
57
+ };
58
+ const handleFileUpload = () => {
59
+ handleSendMessage('file');
60
+ };
61
+ const onSelectEmoji = (value) => {
62
+ keyword.value = (keyword.value ?? '') + (value?.i?.replace('undefined', '') ?? '');
63
+ emojiOpen.value = false;
64
+ chatInputRef.value?.focus?.();
65
+ };
66
+ debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
67
+ const __VLS_modelEmit = defineEmits();
68
+ const __VLS_defaults = {};
69
+ const __VLS_ctx = {
70
+ ...{},
71
+ ...{},
72
+ ...{},
73
+ ...{},
74
+ ...{},
75
+ };
76
+ let __VLS_elements;
77
+ let __VLS_components;
78
+ let __VLS_directives;
79
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
80
+ ...{ class: "flex gap-2" },
81
+ });
82
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
83
+ ...{ class: "w-full relative grow" },
84
+ });
85
+ __VLS_asFunctionalElement(__VLS_elements.input)({
86
+ ...{ onKeydown: (...[$event]) => {
87
+ __VLS_ctx.handleSendMessage('message');
88
+ // @ts-ignore
89
+ [handleSendMessage,];
90
+ } },
91
+ ...{ class: "w-full chat-input h-11 px-4 border border-chat-haze-200" },
92
+ ref: "chatInputRef",
93
+ placeholder: "Send Message",
94
+ });
95
+ (__VLS_ctx.keyword);
96
+ /** @type {typeof __VLS_ctx.chatInputRef} */ ;
97
+ // @ts-ignore
98
+ [keyword, chatInputRef,];
99
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
100
+ ...{ class: "flex gap-2 absolute right-0 bottom-0" },
101
+ });
102
+ /** @type {[typeof PopoverBase, typeof PopoverBase, ]} */ ;
103
+ // @ts-ignore
104
+ const __VLS_0 = __VLS_asFunctionalComponent(PopoverBase, new PopoverBase({
105
+ open: (__VLS_ctx.emojiOpen),
106
+ align: "end",
107
+ side: "top",
108
+ }));
109
+ const __VLS_1 = __VLS_0({
110
+ open: (__VLS_ctx.emojiOpen),
111
+ align: "end",
112
+ side: "top",
113
+ }, ...__VLS_functionalComponentArgsRest(__VLS_0));
114
+ const { default: __VLS_3 } = __VLS_2.slots;
115
+ // @ts-ignore
116
+ [emojiOpen,];
117
+ __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
118
+ ...{ onClick: (...[$event]) => {
119
+ __VLS_ctx.emojiOpen = !__VLS_ctx.emojiOpen;
120
+ // @ts-ignore
121
+ [emojiOpen, emojiOpen,];
122
+ } },
123
+ ...{ class: "" },
124
+ });
125
+ {
126
+ const { content: __VLS_4 } = __VLS_2.slots;
127
+ const __VLS_5 = {}.EmojiPicker;
128
+ /** @type {[typeof __VLS_components.EmojiPicker, typeof __VLS_components.emojiPicker, ]} */ ;
129
+ // @ts-ignore
130
+ EmojiPicker;
131
+ // @ts-ignore
132
+ const __VLS_6 = __VLS_asFunctionalComponent(__VLS_5, new __VLS_5({
133
+ ...{ 'onSelect': {} },
134
+ ...{ class: "!w-[300px]" },
135
+ native: (true),
136
+ offset: (2),
137
+ hideSearch: true,
138
+ }));
139
+ const __VLS_7 = __VLS_6({
140
+ ...{ 'onSelect': {} },
141
+ ...{ class: "!w-[300px]" },
142
+ native: (true),
143
+ offset: (2),
144
+ hideSearch: true,
145
+ }, ...__VLS_functionalComponentArgsRest(__VLS_6));
146
+ let __VLS_9;
147
+ let __VLS_10;
148
+ const __VLS_11 = ({ select: {} },
149
+ { onSelect: (__VLS_ctx.onSelectEmoji) });
150
+ // @ts-ignore
151
+ [onSelectEmoji,];
152
+ var __VLS_8;
153
+ }
154
+ var __VLS_2;
155
+ const __VLS_13 = {}.EmojiPicker;
156
+ /** @type {[typeof __VLS_components.EmojiPicker, typeof __VLS_components.emojiPicker, ]} */ ;
157
+ // @ts-ignore
158
+ EmojiPicker;
159
+ // @ts-ignore
160
+ const __VLS_14 = __VLS_asFunctionalComponent(__VLS_13, new __VLS_13({
161
+ ...{ 'onSelect': {} },
162
+ ...{ class: "opacity-0 pointer-events-none absolute" },
163
+ native: (true),
164
+ offset: (2),
165
+ hideSearch: true,
166
+ }));
167
+ const __VLS_15 = __VLS_14({
168
+ ...{ 'onSelect': {} },
169
+ ...{ class: "opacity-0 pointer-events-none absolute" },
170
+ native: (true),
171
+ offset: (2),
172
+ hideSearch: true,
173
+ }, ...__VLS_functionalComponentArgsRest(__VLS_14));
174
+ let __VLS_17;
175
+ let __VLS_18;
176
+ const __VLS_19 = ({ select: {} },
177
+ { onSelect: (__VLS_ctx.onSelectEmoji) });
178
+ // @ts-ignore
179
+ [onSelectEmoji,];
180
+ var __VLS_16;
181
+ __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
182
+ ...{ onClick: (...[$event]) => {
183
+ __VLS_ctx.handleSendMessage('message');
184
+ // @ts-ignore
185
+ [handleSendMessage,];
186
+ } },
187
+ ...{ class: "h-11 w-10" },
188
+ });
189
+ /** @type {[typeof IconPlan, ]} */ ;
190
+ // @ts-ignore
191
+ const __VLS_21 = __VLS_asFunctionalComponent(IconPlan, new IconPlan({}));
192
+ const __VLS_22 = __VLS_21({}, ...__VLS_functionalComponentArgsRest(__VLS_21));
193
+ __VLS_asFunctionalElement(__VLS_elements.label, __VLS_elements.label)({
194
+ ...{ class: "shrink-0 cursor-pointer relative" },
195
+ });
196
+ __VLS_asFunctionalElement(__VLS_elements.input)({
197
+ ...{ onChange: (__VLS_ctx.handleFileUpload) },
198
+ type: "file",
199
+ ...{ class: "hidden" },
200
+ ref: "refInputImage",
201
+ accept: ".png, .jpeg, .jpg",
202
+ });
203
+ /** @type {typeof __VLS_ctx.refInputImage} */ ;
204
+ // @ts-ignore
205
+ [handleFileUpload, refInputImage,];
206
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
207
+ ...{ class: "h-11 w-11 rounded-full flex-center bg-[#002E6B]" },
208
+ });
209
+ /** @type {[typeof IconPlus, ]} */ ;
210
+ // @ts-ignore
211
+ const __VLS_25 = __VLS_asFunctionalComponent(IconPlus, new IconPlus({
212
+ ...{ class: "text-white" },
213
+ }));
214
+ const __VLS_26 = __VLS_25({
215
+ ...{ class: "text-white" },
216
+ }, ...__VLS_functionalComponentArgsRest(__VLS_25));
217
+ /** @type {__VLS_StyleScopedClasses['']} */ ;
218
+ /** @type {__VLS_StyleScopedClasses['flex']} */ ;
219
+ /** @type {__VLS_StyleScopedClasses['gap-2']} */ ;
220
+ /** @type {__VLS_StyleScopedClasses['w-full']} */ ;
221
+ /** @type {__VLS_StyleScopedClasses['relative']} */ ;
222
+ /** @type {__VLS_StyleScopedClasses['grow']} */ ;
223
+ /** @type {__VLS_StyleScopedClasses['w-full']} */ ;
224
+ /** @type {__VLS_StyleScopedClasses['chat-input']} */ ;
225
+ /** @type {__VLS_StyleScopedClasses['h-11']} */ ;
226
+ /** @type {__VLS_StyleScopedClasses['px-4']} */ ;
227
+ /** @type {__VLS_StyleScopedClasses['border']} */ ;
228
+ /** @type {__VLS_StyleScopedClasses['border-chat-haze-200']} */ ;
229
+ /** @type {__VLS_StyleScopedClasses['flex']} */ ;
230
+ /** @type {__VLS_StyleScopedClasses['gap-2']} */ ;
231
+ /** @type {__VLS_StyleScopedClasses['absolute']} */ ;
232
+ /** @type {__VLS_StyleScopedClasses['right-0']} */ ;
233
+ /** @type {__VLS_StyleScopedClasses['bottom-0']} */ ;
234
+ /** @type {__VLS_StyleScopedClasses['!w-[300px]']} */ ;
235
+ /** @type {__VLS_StyleScopedClasses['opacity-0']} */ ;
236
+ /** @type {__VLS_StyleScopedClasses['pointer-events-none']} */ ;
237
+ /** @type {__VLS_StyleScopedClasses['absolute']} */ ;
238
+ /** @type {__VLS_StyleScopedClasses['h-11']} */ ;
239
+ /** @type {__VLS_StyleScopedClasses['w-10']} */ ;
240
+ /** @type {__VLS_StyleScopedClasses['shrink-0']} */ ;
241
+ /** @type {__VLS_StyleScopedClasses['cursor-pointer']} */ ;
242
+ /** @type {__VLS_StyleScopedClasses['relative']} */ ;
243
+ /** @type {__VLS_StyleScopedClasses['hidden']} */ ;
244
+ /** @type {__VLS_StyleScopedClasses['h-11']} */ ;
245
+ /** @type {__VLS_StyleScopedClasses['w-11']} */ ;
246
+ /** @type {__VLS_StyleScopedClasses['rounded-full']} */ ;
247
+ /** @type {__VLS_StyleScopedClasses['flex-center']} */ ;
248
+ /** @type {__VLS_StyleScopedClasses['bg-[#002E6B]']} */ ;
249
+ /** @type {__VLS_StyleScopedClasses['text-white']} */ ;
250
+ const __VLS_export = (await import('vue')).defineComponent({
251
+ __typeEmits: {},
252
+ __typeProps: {},
253
+ props: {},
254
+ });
255
+ export default {};
@@ -0,0 +1,84 @@
1
+ /// <reference types="C:/phonghq/go-chat/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
+ import Avatar from '../../../components/chat/customer/Avatar.vue';
3
+ const props = withDefaults(defineProps(), {});
4
+ debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
5
+ const __VLS_defaults = {};
6
+ const __VLS_ctx = {
7
+ ...{},
8
+ ...{},
9
+ ...{},
10
+ ...{},
11
+ };
12
+ let __VLS_elements;
13
+ let __VLS_components;
14
+ let __VLS_directives;
15
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
16
+ ...{ class: "flex flex-col items-center justify-center text-center" },
17
+ });
18
+ /** @type {[typeof Avatar, ]} */ ;
19
+ // @ts-ignore
20
+ const __VLS_0 = __VLS_asFunctionalComponent(Avatar, new Avatar({
21
+ ...{ class: "mb-4" },
22
+ src: (__VLS_ctx.data?.avatar ?? ''),
23
+ id: (__VLS_ctx.data?.id ?? ''),
24
+ color: (__VLS_ctx.data?.color),
25
+ name: (__VLS_ctx.data?.username),
26
+ size: "xxl",
27
+ }));
28
+ const __VLS_1 = __VLS_0({
29
+ ...{ class: "mb-4" },
30
+ src: (__VLS_ctx.data?.avatar ?? ''),
31
+ id: (__VLS_ctx.data?.id ?? ''),
32
+ color: (__VLS_ctx.data?.color),
33
+ name: (__VLS_ctx.data?.username),
34
+ size: "xxl",
35
+ }, ...__VLS_functionalComponentArgsRest(__VLS_0));
36
+ // @ts-ignore
37
+ [data, data, data, data,];
38
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
39
+ ...{ class: "flex items-center gap-1" },
40
+ });
41
+ __VLS_asFunctionalElement(__VLS_elements.h2, __VLS_elements.h2)({
42
+ ...{ class: "text-2xl font-semibold" },
43
+ });
44
+ (__VLS_ctx.data?.username ?? 'n/a');
45
+ // @ts-ignore
46
+ [data,];
47
+ __VLS_asFunctionalElement(__VLS_elements.img)({
48
+ src: "../../../assets/images/icons/new-customer.png",
49
+ });
50
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
51
+ ...{ class: "text-chat-haze-400 text-sm mt-1 flex items-center gap-1" },
52
+ });
53
+ __VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({});
54
+ __VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({});
55
+ __VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({});
56
+ __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
57
+ ...{ class: "text-chat-haze-400 text-sm mt-3 max-w-md" },
58
+ });
59
+ /** @type {__VLS_StyleScopedClasses['flex']} */ ;
60
+ /** @type {__VLS_StyleScopedClasses['flex-col']} */ ;
61
+ /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
62
+ /** @type {__VLS_StyleScopedClasses['justify-center']} */ ;
63
+ /** @type {__VLS_StyleScopedClasses['text-center']} */ ;
64
+ /** @type {__VLS_StyleScopedClasses['mb-4']} */ ;
65
+ /** @type {__VLS_StyleScopedClasses['flex']} */ ;
66
+ /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
67
+ /** @type {__VLS_StyleScopedClasses['gap-1']} */ ;
68
+ /** @type {__VLS_StyleScopedClasses['text-2xl']} */ ;
69
+ /** @type {__VLS_StyleScopedClasses['font-semibold']} */ ;
70
+ /** @type {__VLS_StyleScopedClasses['text-chat-haze-400']} */ ;
71
+ /** @type {__VLS_StyleScopedClasses['text-sm']} */ ;
72
+ /** @type {__VLS_StyleScopedClasses['mt-1']} */ ;
73
+ /** @type {__VLS_StyleScopedClasses['flex']} */ ;
74
+ /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
75
+ /** @type {__VLS_StyleScopedClasses['gap-1']} */ ;
76
+ /** @type {__VLS_StyleScopedClasses['text-chat-haze-400']} */ ;
77
+ /** @type {__VLS_StyleScopedClasses['text-sm']} */ ;
78
+ /** @type {__VLS_StyleScopedClasses['mt-3']} */ ;
79
+ /** @type {__VLS_StyleScopedClasses['max-w-md']} */ ;
80
+ const __VLS_export = (await import('vue')).defineComponent({
81
+ __typeProps: {},
82
+ props: {},
83
+ });
84
+ export default {};
@@ -0,0 +1,45 @@
1
+ /// <reference types="C:/phonghq/go-chat/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
+ import { onMounted, onBeforeUnmount } from 'vue';
3
+ import { useDebounce } from '../utils/debounce';
4
+ // import { useGeneralStore } from '@/stores/general'
5
+ // const deviceType = computed({
6
+ // set(value: any) {
7
+ // return useGeneralStore().deviceResponsive = value
8
+ // },
9
+ // get() {
10
+ // return useGeneralStore().deviceResponsive
11
+ // }
12
+ // })
13
+ // const getDeviceType = () => {
14
+ // const width = window.innerWidth
15
+ // if (width < 767) {
16
+ // return 'mobile'
17
+ // } else if (width < 1023) {
18
+ // return 'tablet'
19
+ // } else {
20
+ // return 'window'
21
+ // }
22
+ // }
23
+ const updateDeviceType = useDebounce(() => {
24
+ // const newType = getDeviceType()
25
+ // if (deviceType.value !== newType) {
26
+ // deviceType.value = newType
27
+ // }
28
+ }, 500);
29
+ onMounted(() => {
30
+ updateDeviceType();
31
+ window.addEventListener('resize', updateDeviceType);
32
+ });
33
+ onBeforeUnmount(() => {
34
+ window.removeEventListener('resize', updateDeviceType);
35
+ });
36
+ debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
37
+ const __VLS_ctx = {
38
+ ...{},
39
+ ...{},
40
+ };
41
+ let __VLS_elements;
42
+ let __VLS_components;
43
+ let __VLS_directives;
44
+ const __VLS_export = (await import('vue')).defineComponent({});
45
+ export default {};