{"version":3,"sources":["webpack:///./src/views/chat/views/chatBase.vue?862d","webpack:///./src/views/chat/views/chatBase.vue?081e","webpack:///./src/views/chat/views/chatBase.vue","webpack:///./src/views/chat/views/chatBase.vue?57bd"],"names":["_withId","_hoisted_1","class","_hoisted_2","key","render","_ctx","_cache","$props","$setup","$data","$options","_component_chat_header","_component_chat_component","loading","isError","hasUserInfo","chatVm","hasOptions","onOpenDetail","$event","openDetail","onSettingsModal","settingsModal","userIdentifier","userName","name","style","canWrite","store","state","chatRoomAllowances","this","getSingleChatListVm","$route","params","identifier","toString","then","x","type","ChatRoom","getChatRoomAllowances","catch","ex","$opModal","show","message","LocalizationServices","getLocalizedValue","buttonUrl","canContent","chatName","isGroupChat","$router","push","components","ChatComponent","ChatHeader","__exports__"],"mappings":"yIACA,MAAMA,EAAuB,eAAa,mBAE1C,eAAa,mBACb,MAAMC,EAAa,CAAEC,MAAO,sBACtBC,EAAa,CAAEC,IAAK,GAC1B,iBAEO,MAAMC,EAAsBL,EAAQ,CAACM,EAAUC,EAAYC,EAAYC,EAAYC,EAAWC,KACnG,MAAMC,EAAyB,eAAkB,eAC3CC,EAA4B,eAAkB,kBAEpD,OAAQ,iBAAc,eAAa,MAAOZ,EAAY,CAClDK,EAAKQ,SAAYR,EAAKS,QAkBpB,eAAoB,IAAI,IAjBvB,iBAAc,eAAa,MAAOZ,EAAY,CAC7C,eAAaS,EAAwB,CACnCI,YAAaV,EAAKW,OAClBC,WAAYZ,EAAKW,OACjBE,aAAcZ,EAAO,KAAOA,EAAO,GAAMa,GAAiBd,EAAKe,cAC/DC,gBAAiBf,EAAO,KAAOA,EAAO,GAAMa,GAAiBd,EAAKiB,iBAClEC,eAAgBlB,EAAKW,OAAOO,eAC5BC,SAAUnB,EAAKW,OAAOS,MACrB,KAAM,EAAG,CAAC,cAAe,aAAc,iBAAkB,aAC5D,eAAab,EAA2B,CACtC,YAAaP,EAAKW,OAClB,uBAAwB,EACxB,2BAA4B,GAC5BU,MAAO,GACP,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.js","sourcesContent":["import { resolveComponent as _resolveComponent, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, withScopeId as _withScopeId, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\nconst _withId = /*#__PURE__*/_withScopeId(\"data-v-76dcacbe\")\n\n_pushScopeId(\"data-v-76dcacbe\")\nconst _hoisted_1 = { class: \"widePage hasHeader\" }\nconst _hoisted_2 = { key: 0 }\n_popScopeId()\n\nexport const render = /*#__PURE__*/_withId((_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) => {\n const _component_chat_header = _resolveComponent(\"chat-header\")!\n const _component_chat_component = _resolveComponent(\"chat-component\")!\n\n return (_openBlock(), _createBlock(\"div\", _hoisted_1, [\n (!_ctx.loading && !_ctx.isError)\n ? (_openBlock(), _createBlock(\"div\", _hoisted_2, [\n _createVNode(_component_chat_header, {\n hasUserInfo: _ctx.chatVm,\n hasOptions: _ctx.chatVm,\n onOpenDetail: _cache[1] || (_cache[1] = ($event: any) => (_ctx.openDetail())),\n onSettingsModal: _cache[2] || (_cache[2] = ($event: any) => (_ctx.settingsModal())),\n userIdentifier: _ctx.chatVm.userIdentifier,\n userName: _ctx.chatVm.name\n }, null, 8, [\"hasUserInfo\", \"hasOptions\", \"userIdentifier\", \"userName\"]),\n _createVNode(_component_chat_component, {\n \"chat-room\": _ctx.chatVm,\n \"container-adjustment\": 3,\n \"container-adjustment-oko\": 83,\n style: {},\n \"can-write\": _ctx.canWrite\n }, null, 8, [\"chat-room\", \"can-write\"])\n ]))\n : _createCommentVNode(\"\", true)\n ]))\n})","\r\nimport { Options, Vue } from 'vue-class-component';\r\nimport { BaseChatClient, ChatRoomClient, UserClient } from '@/services/Services';\r\nimport ChatComponent from '@/components/chat/chatComponent.vue';\r\nimport ChatHeader from '../components/chatHeader.vue';\r\nimport ChatSettingsModal from '../modals/chatSettingsModal.vue';\r\n// import CustomConfirm from '@/components/customConfirm.vue';\r\n// import OpenProfileModal from '../components/openProfileModal.vue';\r\nimport store from '@/store';\r\nimport * as OM from '@/model';\r\nimport * as Const from '@/const';\r\nimport ModalSuccessError from '@/components/modalSuccessError.vue';\r\nimport { LocalizationServices } from '@/services/LocalizationServices';\r\n\r\n@Options({\r\n components: {\r\n ChatComponent,\r\n ChatHeader\r\n }\r\n})\r\nexport default class ChatBase extends Vue {\r\n\r\n loading: boolean = true;\r\n isError: boolean = false;\r\n chatVm: OM.ChatListVm = null;\r\n\r\n created() {\r\n store.state.chatRoomAllowances = null;\r\n this.loading = true;\r\n BaseChatClient.getSingleChatListVm(this.$route.params.identifier.toString())\r\n .then(x => {\r\n this.chatVm = x;\r\n if(this.chatVm.type == Const.ChatRoomType.ChatRoom){\r\n ChatRoomClient.getChatRoomAllowances(this.$route.params.identifier.toString())\r\n .then(x => {\r\n store.state.chatRoomAllowances = x;\r\n })\r\n }\r\n\r\n this.loading = false;\r\n })\r\n .catch( ex => {\r\n this.isError = true;\r\n this.loading = false\r\n this.$opModal.show(ModalSuccessError, {\r\n isError: true,\r\n message: LocalizationServices.getLocalizedValue(\"app_SembraCheQuestaConversazioneNonEsistaPiù!\", \"Sembra che questa conversazione non esista più!\"),\r\n buttonUrl: \"/notification\"\r\n })\r\n });\r\n }\r\n\r\n get canWrite() {\r\n if(store.state.chatRoomAllowances){\r\n return store.state.chatRoomAllowances.canContent;\r\n }\r\n return true;\r\n }\r\n\r\n settingsModal() {\r\n this.$opModal.show(ChatSettingsModal, {\r\n chatName: this.chatVm.name,\r\n userIdentifier: this.chatVm.userIdentifier,\r\n isGroupChat: this.chatVm.type == Const.ChatRoomType.ChatRoom\r\n })\r\n }\r\n\r\n openDetail() {\r\n if(this.chatVm.type == \"ConversationRoom\"){\r\n this.$router.push('/profile/' + this.chatVm.userIdentifier);\r\n } else if(this.chatVm.type == \"ChatRoom\"){\r\n this.$router.push('/chats/detail/' + this.chatVm.identifier);\r\n } \r\n }\r\n // this.$opModal.show(OpenProfileModal, {\r\n // title: this.chatVm.name,\r\n // userIdentifier: this.chatVm.userIdentifier,\r\n // openProfile: () => {\r\n // this.$opModal.closeLast();\r\n\r\n // if(this.chatVm.type == \"ConversationRoom\"){\r\n // this.$router.push('/profile/' + this.chatVm.userIdentifier);\r\n // } else if(this.chatVm.type == \"ChatRoom\"){\r\n // this.$router.push('/chats/detail/' + this.chatVm.identifier);\r\n // }\r\n // },\r\n // blockUser: () => {\r\n // var title = LocalizationServices.getLocalizedValue(\"app_attenzione\", \"Attenzione!\");\r\n // var text = LocalizationServices.getLocalizedValue(\"app_vuoidavverobloccarequestoutente\", \"Vuoi davvero bloccare questo utente?\");\r\n\r\n // this.$opModal.show(CustomConfirm, {\r\n // title: title,\r\n // text: text,\r\n // callback: (value: boolean) => {\r\n // if(!value)\r\n // this.$opModal.closeLast();\r\n // else {\r\n // UserClient.blockUser(this.chatVm.userIdentifier)\r\n // .then( x => {\r\n // this.$router.replace(\"/chats\");\r\n // this.$opModal.closeLast();\r\n // })\r\n // }\r\n // }\r\n\r\n // })\r\n // }\r\n //})\r\n\r\n }\r\n\r\n\r\n\r\n","import { render } from \"./chatBase.vue?vue&type=template&id=76dcacbe&scoped=true&ts=true\"\nimport script from \"./chatBase.vue?vue&type=script&lang=ts\"\nexport * from \"./chatBase.vue?vue&type=script&lang=ts\"\n\nimport \"./chatBase.vue?vue&type=style&index=0&id=76dcacbe&scoped=true&lang=css\"\n\nimport exportComponent from \"C:\\\\Users\\\\rekt\\\\source\\\\repos\\\\uose\\\\uoseapp_new\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-76dcacbe\"]])\n\nexport default __exports__","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--1-1!./chatBase.vue?vue&type=style&index=0&id=76dcacbe&scoped=true&lang=css\""],"sourceRoot":""}