"use strict";(self.webpackChunkncpasswords=self.webpackChunkncpasswords||[]).push([[3652],{64709(t,e,s){s.r(e),s.d(e,{default:()=>T});var r=function(){var t=this,e=t._self._c;return e("div",{class:t.getContentClass,attrs:{id:"app-content"}},[e("div",{staticClass:"app-content-left"},[e("breadcrumb",{attrs:{showAddNew:t.isNotEmpty,deleteAll:!0,restoreAll:!0,newPassword:!1},on:{deleteAll:t.clearTrash,restoreAll:t.restoreTrash}}),t._v(" "),e("div",{staticClass:"item-list"},[t.isNotEmpty?e("header-line",{attrs:{field:t.sorting.field,ascending:t.sorting.ascending},on:{updateSorting:function(e){return t.updateSorting(e)}}}):t._e(),t._v(" "),t._l(t.folders,function(s){return e("folder-line",{key:s.id,attrs:{folder:s}},[e("i",{staticClass:"icon fa fa-undo",attrs:{slot:"middle",title:t.restoreTitle},on:{click:function(e){return e.preventDefault(),t.restoreFolderAction(s)}},slot:"middle"}),t._v(" "),e("li",{attrs:{slot:"menu-top"},slot:"menu-top"},[e("translate",{attrs:{tag:"a",href:"#","data-item-action":"restore",icon:"undo",say:"Restore"},on:{click:function(e){return e.preventDefault(),t.restoreFolderAction(s)}}})],1)])}),t._v(" "),t._l(t.tags,function(s){return e("tag-line",{key:s.id,attrs:{tag:s}},[e("i",{staticClass:"icon fa fa-undo",attrs:{slot:"middle",title:t.restoreTitle},on:{click:function(e){return e.preventDefault(),t.restoreTagAction(s)}},slot:"middle"}),t._v(" "),e("li",{attrs:{slot:"menu-top"},slot:"menu-top"},[e("translate",{attrs:{tag:"a",href:"#","data-item-action":"restore",icon:"undo",say:"Restore"},on:{click:function(e){return e.preventDefault(),t.restoreTagAction(s)}}})],1)])}),t._v(" "),t._l(t.passwords,function(s){return s.trashed?e("password-line",{key:s.id,attrs:{password:s}},[e("i",{staticClass:"icon fa fa-undo",attrs:{slot:"middle",title:t.restoreTitle},on:{click:function(e){return e.preventDefault(),t.restorePasswordAction(s)}},slot:"middle"}),t._v(" "),e("li",{attrs:{slot:"menu-top"},slot:"menu-top"},[e("translate",{attrs:{tag:"a",href:"#","data-item-action":"restore",icon:"undo",say:"Restore"},on:{click:function(e){return e.preventDefault(),t.restorePasswordAction(s)}}})],1)]):t._e()}),t._v(" "),t.isNotEmpty?e("footer-line",{attrs:{passwords:t.passwords,folders:t.folders,tags:t.tags}}):t._e(),t._v(" "),t.isEmpty?e("empty",{attrs:{text:t.getEmptyText}}):t._e()],2)],1)])};r._withStripped=!0;var o=s(56423),a=s(53024),n=s(45314),i=s(193),l=s(83571),d=s(30845),c=s(56394),h=s(48163),u=s(54164),f=s(28301),p=s(17638),A=s(33277),g=s(18221),m=s(80444);const w={extends:u.A,components:{Translate:a.A,Breadcrumb:n.A,FolderLine:i.A,HeaderLine:l.A,FooterLine:d.A,PasswordLine:c.A,empty:()=>s.e(5645).then(s.bind(s,80149)),"tag-line":()=>s.e(11).then(s.bind(s,35404))},computed:{restoreTitle:()=>m.A.translate("Restore this item"),getEmptyText(){return this.search.active?m.A.translate('We could not find anything for "{query}"',{query:this.search.query}):"Deleted items will appear here"}},methods:{refreshView:function(){let t=this.ui.showTags?"model+tags":"model";o.A.findPasswords({trashed:!0},t).then(this.updatePasswordList),o.A.findFolders({trashed:!0}).then(this.updateFolderList),o.A.findTags({trashed:!0}).then(this.updateTagList)},restorePasswordAction(t){p.A.restorePassword(t),o.A.findPasswords({trashed:!0}).then(this.updatePasswordList)},restoreFolderAction(t){f.A.restoreFolder(t),o.A.findFolders({trashed:!0}).then(this.updateFolderList)},restoreTagAction(t){h.A.restoreTag(t),o.A.findTags({trashed:!0}).then(this.updateTagList)},restoreTrash(){A.A.confirm("Restore all items in trash?","Restore Items").then(()=>{for(let t=0;t<this.passwords.length;t++)p.A.restorePassword(this.passwords[t]);for(let t=0;t<this.folders.length;t++)f.A.restoreFolder(this.folders[t]);for(let t=0;t<this.tags.length;t++)h.A.restoreTag(this.tags[t]);g.A.success("Items restored")})},clearTrash(){A.A.confirm("Delete all items in trash?","Empty Trash").then(()=>{for(let t=0;t<this.passwords.length;t++)p.A.deletePassword(this.passwords[t],!1);for(let t=0;t<this.folders.length;t++)f.A.deleteFolder(this.folders[t],!1);for(let t=0;t<this.tags.length;t++)h.A.deleteTag(this.tags[t],!1);g.A.info("Trash emptied")})}}},T=(0,s(14486).A)(w,r,[],!1,null,null,null).exports}}]);