"use strict";(globalThis["webpackChunkaurora_corporate_mobile_ui"]||=[]).push([[9429],{41752(e,t,l){l.r(t),l.d(t,{default:()=>K});var s=l(61758),r=l(58790);const n={class:"key_email q-mb-md text-bold"},a={class:"overflow-hidden"},o={class:"keyView"},i={key:1,class:"q-pa-lg full-width flex items-center full-width"};function u(e,t,l,u,c,d){const m=(0,s.g2)("q-scroll-area"),h=(0,s.g2)("AppButton");return(0,s.uX)(),(0,s.CE)(s.FK,null,[e.currentKeys.length?((0,s.uX)(),(0,s.Wv)(m,{key:0,"thumb-style":{width:"5px"},class:"keys_list__all q-px-lg q-pt-lg",style:{"flex-grow":"1"}},{default:(0,s.k6)(()=>[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(e.keysFromArmor,e=>((0,s.uX)(),(0,s.CE)(s.FK,null,[(0,s.Lk)("div",n,(0,r.v_)(e.Email),1),(0,s.Lk)("div",a,[(0,s.Lk)("span",o,(0,r.v_)(e.PublicPgpKey),1)])],64))),256))]),_:1})):(0,s.Q3)("",!0),e.currentKeys.length?((0,s.uX)(),(0,s.CE)("div",i,[(0,s.bF)(h,{onClick:d.sendAllKeys,label:e.$t("OPENPGPMOBILEWEBCLIENT.ACTION_SEND_ALL"),disabled:!d.isSendAvailable},null,8,["onClick","label","disabled"]),(0,s.bF)(h,{onClick:d.downloadAllKeys,label:e.$t("OPENPGPMOBILEWEBCLIENT.ACTION_DOWNLOAD_ALL"),class:"q-mt-lg"},null,8,["onClick","label"])])):(0,s.Q3)("",!0)],64)}l(14748);var c=l(15679),d=l(9950),m=l(58983),h=l(38176),y=l(12968),E=l(40024),p=l(67754);const A={name:"AllExternalKeysView",components:{AppButton:m.A},data:()=>({keysFromArmor:[]}),computed:{...(0,c.L8)(d.Qp,["currentKeys"]),armorText(){return this.currentKeys.reduce((e,t)=>(e+=t.armor,e+"\n"),"")},isSendAvailable(){return(0,y.sY)()&&!!this.armorText}},methods:{...(0,c.i0)(d.Qp,["changeCurrentKeys"]),async sendAllKeys(){if(!this.isSendAvailable)return;const e=`${this.$t("OPENPGPWEBCLIENT.TEXT_ALL_PUBLIC_KEYS_FILENAME")}.asc`,t=await(0,y.qs)({content:this.armorText,fileName:e,router:this.$router});t||h.A.showError(this.$t("COREWEBCLIENT.ERROR_UNKNOWN"))},downloadAllKeys(){return(0,E.U)(this.armorText,"public_keys.asc")}},async mounted(){this.currentKeys.length||this.$router.push("/settings/open-pgp/external-keys");const e=await p["default"].getArmorInfo(this.armorText);this.keysFromArmor=e?.map(e=>({PublicPgpKey:e.armor(),Email:e.getUserIds()[0]}))},beforeUnmount(){this.changeCurrentKeys([])}};var _=l(12807),b=l(19600),k=l(98582),g=l.n(k);const C=(0,_.A)(A,[["render",u],["__scopeId","data-v-650e94dd"]]),K=C;g()(A,"components",{QScrollArea:b.A})}}]);