"use strict";(self.webpackChunk_bitwarden_web_vault=self.webpackChunk_bitwarden_web_vault||[]).push([[160],{31160:(t,n,o)=>{o.r(n),o.d(n,{OrgImportComponent:()=>S});var i=o(72245),e=o(3204),r=o(44451),a=o(67553),c=o(3633),u=o(94298),s=o(17530),l=o(25065),d=o(56111),f=function(t,n,o,i){return new(o||(o=Promise))((function(e,r){function a(t){try{u(i.next(t))}catch(n){r(n)}}function c(t){try{u(i.throw(t))}catch(n){r(n)}}function u(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(t){t(n)}))).then(a,c)}u((i=i.apply(t,n||[])).next())}))};class p{constructor(t){this.collectionAdminService=t}getAllAdminCollections(t){return f(this,void 0,void 0,(function*(){return yield this.collectionAdminService.getAll(t)}))}}p.ɵfac=function(t){return new(t||p)(d.KVO(r.vE))},p.ɵprov=d.jDH({token:p,factory:p.ɵfac});var m=o(89459),h=o(35500),v=o(26657),g=o(56898),b=o(10672),I=o(88016),y=o(20464),w=function(t,n,o,i){return new(o||(o=Promise))((function(e,r){function a(t){try{u(i.next(t))}catch(n){r(n)}}function c(t){try{u(i.throw(t))}catch(n){r(n)}}function u(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(t){t(n)}))).then(a,c)}u((i=i.apply(t,n||[])).next())}))};class S{constructor(t,n,o,i){this.route=t,this.organizationService=n,this.router=o,this.accountService=i,this.routeOrgId=null,this.loading=!1,this.disabled=!1}ngOnInit(){this.routeOrgId=this.route.snapshot.paramMap.get("organizationId")}onSuccessfulImport(t){return w(this,void 0,void 0,(function*(){const n=yield(0,i._)((0,c.F6)(this.accountService.activeAccount$)),o=yield(0,i._)(this.organizationService.organizations$(n).pipe((0,e.T)((n=>n.find((n=>n.id===t))))));null!=o&&(0,a.of)(o)&&(yield this.router.navigate(["organizations",t,"vault"]))}))}}S.ɵfac=function(t){return new(t||S)(d.rXU(m.nX),d.rXU(a.PV),d.rXU(m.Ix),d.rXU(h.Di))},S.ɵcmp=d.VBU({type:S,selectors:[["ng-component"]],standalone:!0,features:[d.Jv_([{provide:u.H7,useClass:p,deps:[r.vE]}]),d.aNF],decls:6,vars:6,consts:[[3,"formDisabled","formLoading","onSuccessfulImport","organizationId"],["form","import_form_importForm","bitButton","","type","submit","bitFormButton","","buttonType","primary",3,"disabled","loading"]],template:function(t,n){1&t&&(d.nrm(0,"app-header"),d.j41(1,"bit-container")(2,"tools-import",0),d.bIt("formDisabled",(function(t){return n.disabled=t}))("formLoading",(function(t){return n.loading=t}))("onSuccessfulImport",(function(t){return n.onSuccessfulImport(t)})),d.k0s(),d.j41(3,"button",1),d.EFF(4),d.nI1(5,"i18n"),d.k0s()()),2&t&&(d.R7$(2),d.FS9("organizationId",n.routeOrgId),d.R7$(),d.Y8G("disabled",n.disabled)("loading",n.loading),d.R7$(),d.SpI(" ",d.bMT(5,4,"importData")," "))},dependencies:[l.G,v.$,g.Q,b.H,I.$,s.Pi,l.T,y.f],encapsulation:2})}}]);
//# sourceMappingURL=160.57063bb0f696f15e28d7.js.map