import{c as g,V as v,b as y}from"./VCard-DRptUN8Y.js";import{c,o as n,w as e,a,e as k,t as l,m as f,F as x,G as b,q as V,l as o,j as h,b as A,g as C,M as T,f as w}from"./index-CTxlYqj4.js";import{V as u,a as s}from"./VRow-B-csPNw7.js";import{d as B,V as $}from"./VAvatar-x_79C0tA.js";import{a as E}from"./aliases-CTtmxHck.js";import{V as N,a as R}from"./VToolbar-Cd2iSn8H.js";import"./tag-Dx3OexMp.js";/* empty css              */import"./VProgressCircular-ubzZW5PC.js";const j={class:"headline"},G={__name:"AliasRecipientsSummary",props:{alias:{type:Object,default:null}},setup(i){return(t,d)=>(n(),c(y,null,{default:e(()=>[a(g,null,{default:e(()=>[k("div",j,l(t.$gettext("Recipients")),1)]),_:1}),a(v,null,{default:e(()=>[(n(!0),f(x,null,b(i.alias.recipients,r=>(n(),f("p",{key:r},l(r),1))),128))]),_:1})]),_:1}))}},S={class:"headline"},D={__name:"AliasSummary",props:{alias:{type:Object,default:null}},setup(i){return(t,d)=>(n(),c(y,null,{default:e(()=>[a(g,null,{default:e(()=>[k("div",S,l(t.$gettext("General information")),1)]),_:1}),a(v,null,{default:e(()=>[a(u,null,{default:e(()=>[a(s,{cols:"6"},{default:e(()=>[o(l(t.$gettext("Creation date")),1)]),_:1}),a(s,{cols:"6"},{default:e(()=>[o(l(t.$date(i.alias.creation)),1)]),_:1})]),_:1}),a(u,null,{default:e(()=>[a(s,{cols:"6"},{default:e(()=>[o(l(t.$gettext("Modified")),1)]),_:1}),a(s,{cols:"6"},{default:e(()=>[o(l(t.$date(i.alias.last_modification)),1)]),_:1})]),_:1}),a(u,null,{default:e(()=>[a(s,{cols:"6"},{default:e(()=>[o(l(t.$gettext("Enabled")),1)]),_:1}),a(s,{cols:"6"},{default:e(()=>[a(B,{color:i.alias.enabled?"success":"error",icon:i.alias.enabled?"mdi-check-circle":"mdi-close-circle",variant:"flat"},null,8,["color","icon"])]),_:1})]),_:1}),i.alias.expiry?(n(),c(u,{key:0},{default:e(()=>[a(s,{cols:"6"},{default:e(()=>[o(l(t.$gettext("Expire at")),1)]),_:1}),a(s,{cols:"6"})]),_:1})):V("",!0),i.alias.description?(n(),c(u,{key:1},{default:e(()=>[a(s,{cols:"6"},{default:e(()=>[o(l(t.$gettext("Description")),1)]),_:1}),a(s,{cols:"6"},{default:e(()=>[o(l(i.alias.description),1)]),_:1})]),_:1})):V("",!0)]),_:1})]),_:1}))}},F={__name:"AliasView",setup(i){const{$gettext:t}=A(),d=T(),r=C({pk:d.params.id});function m(){E.get(d.params.id).then(_=>{r.value=_.data})}return m(),(_,p)=>(n(),f("div",null,[a(N,{flat:""},{default:e(()=>[a(R,null,{default:e(()=>[o(l(w(t)("Alias"))+" "+l(r.value.address)+" ",1),a($,{color:"primary",icon:"mdi-circle-edit-outline",to:{name:"AliasEdit",params:{id:r.value.pk}}},null,8,["to"]),a($,{color:"primary",icon:"mdi-reload",onClick:p[0]||(p[0]=I=>m())})]),_:1})]),_:1}),a(u,null,{default:e(()=>[a(s,{cols:"6"},{default:e(()=>[a(D,{alias:r.value},null,8,["alias"]),a(G,{alias:r.value,class:"mt-2"},null,8,["alias"])]),_:1})]),_:1})]))}},Q=h(F,[["__scopeId","data-v-ad04a3d2"]]);export{Q as default};
