{"version":3,"file":"comments-comments-tab.js?v=33814ecdcacdd351bdf2","mappings":";mBA0BA,IAAIA,EAAc,KAClB,MAAMC,EAAa,IAAIC,IAAIC,MAAMC,QAAQC,IAAI,CAC5CC,GAAI,WACJC,KAAMC,EAAE,WAAY,YACpBC,uOAEAC,YAAYC,EAAIC,EAAUC,GACrBb,GACHA,EAAYc,WAEbd,EAAc,IAAIE,IAAIa,SAASC,KAAK,QAAS,CAE5CC,OAAQJ,UAGHb,EAAYkB,OAAON,EAASN,IAClCN,EAAYmB,OAAOR,EACpB,EACAO,OAAON,GACNZ,EAAYkB,OAAON,EAASN,GAC7B,EACAc,UACCpB,EAAYc,WACZd,EAAc,IACf,EACAqB,sBACCrB,EAAYsB,uBACb,IAGDC,OAAOC,iBAAiB,oBAAoB,WACvCtB,IAAIC,OAASD,IAAIC,MAAMC,SAC1BF,IAAIC,MAAMC,QAAQqB,YAAYxB,EAEhC","sources":["webpack:///nextcloud/apps/comments/src/comments-tab.js"],"sourcesContent":["/**\n * @copyright Copyright (c) 2020 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\n\n// eslint-disable-next-line n/no-missing-import, import/no-unresolved\nimport MessageReplyText from '@mdi/svg/svg/message-reply-text.svg?raw'\n\n// Init Comments tab component\nlet TabInstance = null\nconst commentTab = new OCA.Files.Sidebar.Tab({\n\tid: 'comments',\n\tname: t('comments', 'Comments'),\n\ticonSvg: MessageReplyText,\n\n\tasync mount(el, fileInfo, context) {\n\t\tif (TabInstance) {\n\t\t\tTabInstance.$destroy()\n\t\t}\n\t\tTabInstance = new OCA.Comments.View('files', {\n\t\t\t// Better integration with vue parent component\n\t\t\tparent: context,\n\t\t})\n\t\t// Only mount after we have all the info we need\n\t\tawait TabInstance.update(fileInfo.id)\n\t\tTabInstance.$mount(el)\n\t},\n\tupdate(fileInfo) {\n\t\tTabInstance.update(fileInfo.id)\n\t},\n\tdestroy() {\n\t\tTabInstance.$destroy()\n\t\tTabInstance = null\n\t},\n\tscrollBottomReached() {\n\t\tTabInstance.onScrollBottomReached()\n\t},\n})\n\nwindow.addEventListener('DOMContentLoaded', function() {\n\tif (OCA.Files && OCA.Files.Sidebar) {\n\t\tOCA.Files.Sidebar.registerTab(commentTab)\n\t}\n})\n"],"names":["TabInstance","commentTab","OCA","Files","Sidebar","Tab","id","name","t","iconSvg","async","el","fileInfo","context","$destroy","Comments","View","parent","update","$mount","destroy","scrollBottomReached","onScrollBottomReached","window","addEventListener","registerTab"],"sourceRoot":""}