(self.webpackChunkncpasswords=self.webpackChunkncpasswords||[]).push([[9816],{59814(s,t,e){"use strict";e.r(t),e.d(t,{default:()=>a});const a={}},87602(s,t,e){"use strict";e.r(t),e.d(t,{default:()=>d});var a=e(56423),h=e(54164),r=e(16129),o=e(80444);const i={extends:h.A,data:()=>({hasPasswords:!1,hasFolders:!1,hasTags:!1}),computed:{getBreadcrumb:()=>({showAddNew:!1}),isEmpty(){return!(this.loading||this.search.active&&0!==this.search.total&&(this.passwords.length||this.folders.length||this.tags.length))},isNotEmpty:()=>0!==r.A.status.total&&r.A.status.active,getEmptyText(){return this.search.active?o.A.translate('We could not find anything for "{query}"',{query:this.search.query}):"Use the search box to search"}},methods:{refreshView:function(){let s=this.ui.showTags?"model+tags":"model";a.A.listPasswords(s).then(this.updatePasswordList),a.A.listFolders("model").then(this.updateFolderList),a.A.listTags("model").then(this.updateTagList)},updateDatabase(){this.hasPasswords&&this.hasFolders&&this.hasTags||(this.loading=!0);let s={passwords:this.passwords,folders:this.folders,tags:this.tags};r.A.setDatabase(s),setTimeout(()=>{let s=this.$route.params.query,t=atob(s);r.A.search(t)},10)}},watch:{passwords(){this.hasPasswords=!0,this.updateDatabase()},folders(){this.hasFolders=!0,this.updateDatabase()},tags(){this.hasTags=!0,this.updateDatabase()},search:{handler(s){if(s.active){let t=btoa(s.query);"Search"===this.$route.name&&this.$route.params.query!==t&&this.$router.push({name:"Search",params:{query:t}})}},deep:!0}}};e(68903);const d=(0,e(14486).A)(i,void 0,void 0,!1,null,null,null).exports},68903(s,t,e){var a=e(59814);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[s.id,a,""]]),a.locals&&(s.exports=a.locals),(0,e(70534).A)("02c24b5e",a,!1,{})}}]);