"use strict";(globalThis["webpackChunkaurora_corporate_mobile_ui"]||=[]).push([[6180],{40017(e,t,l){l.r(t),l.d(t,{default:()=>w});var n=l(61758),o=l(58790);const r={class:"q-mb-md text-bold"},s={class:"overflow-hidden"},i={class:"keyView"},a={key:1,class:"q-pa-lg full-width flex items-center"},y={class:"full-width"};function c(e,t,l,c,u,d){const m=(0,n.g2)("q-scroll-area"),p=(0,n.g2)("AppButton"),K=(0,n.g2)("DeleteKeyDialog");return(0,n.uX)(),(0,n.CE)(n.FK,null,[e.currentMyKey?((0,n.uX)(),(0,n.Wv)(m,{key:0,"thumb-style":{width:"5px"},class:"myKey q-px-lg q-pt-lg"},{default:(0,n.k6)(()=>[(0,n.Lk)("div",r,(0,o.v_)(d.keyName),1),(0,n.Lk)("div",s,[(0,n.Lk)("span",i,(0,o.v_)(e.currentMyKey.armor),1)])]),_:1})):(0,n.Q3)("",!0),e.currentMyKey?((0,n.uX)(),(0,n.CE)("div",a,[(0,n.Lk)("div",y,[(0,n.bF)(p,{onClick:d.downloadKey,label:e.$t("OPENPGPWEBCLIENT.ACTION_DOWNLOAD")},null,8,["onClick","label"]),(0,n.bF)(p,{onClick:d.confirmDelete,label:e.$t("OPENPGPWEBCLIENT.ACTION_DELETE_KEY"),class:"q-mt-lg"},null,8,["onClick","label"])])])):(0,n.Q3)("",!0),(0,n.bF)(K,{modelValue:e.isDeleting,"onUpdate:modelValue":t[0]||(t[0]=t=>e.isDeleting=t),onClose:d.closeDeleteKeyDialog,onDelete:d.deleteKey,mail:e.currentMyKey?.email},null,8,["modelValue","onClose","onDelete","mail"])],64)}l(14748);var u=l(15679),d=l(9950),m=l(58983),p=l(2011),K=l(40024),g=l(67754);const h={name:"MyKeyView",components:{DeleteKeyDialog:p.A,AppButton:m.A},data:()=>({isDeleting:!1,keyArmor:{}}),computed:{...(0,u.L8)(d.Qp,["currentMyKey"]),keyName(){return this.keyArmor[0]?.getUserIds()[0]}},methods:{...(0,u.i0)(d.Qp,["setCurrentMyKey","deleteMyKey"]),confirmDelete(){this.isDeleting=!0},downloadKey(){const e=`${this.keyName.replace(/[<>]/g,"")} OpenPGP ${this.currentMyKey.isPublic?"public":"private"} key.asc`;return(0,K.U)(this.currentMyKey.armor,e)},size(){console.log(window,"window")},deleteKey(){const e=this.deleteMyKey(this.currentMyKey);e&&this.$router.replace("/settings/open-pgp/my-keys")},closeDeleteKeyDialog(){this.isDeleting=!1}},async mounted(){this.currentMyKey||this.$router.push("/settings/open-pgp/my-keys"),this.keyArmor=await g["default"].getArmorInfo(this.currentMyKey?.armor)},beforeUnmount(){this.setCurrentMyKey(null)}};var k=l(12807),D=l(19600),b=l(98582),C=l.n(b);const M=(0,k.A)(h,[["render",c],["__scopeId","data-v-f6cb21cc"]]),w=M;C()(h,"components",{QScrollArea:D.A})}}]);