import{I as B,i as f,M as N,H as h,f as V,n as w}from"./app-JmgyQoR0.js";import{b as z,s as T,D as k,h as o,i as y,j as m,u as c,x as s,z as e,K as r,E as a,t as d,l,H as M}from"./vue-y3KLWBaS.js";const D={key:1},E={key:0},H=["src"],S=z({__name:"MkAnnouncement",props:{announcement:{}},setup(v){const g=v,{id:I,text:$,title:u,imageUrl:i,isGoodNews:C}=g.announcement,_=T(),A=()=>{_.value.close(),V("i/read-announcement",{announcementId:I})};return(t,n)=>{const p=k("MkTime"),j=k("Mfm");return o(),y(h,{ref_key:"modal",ref:_,"z-priority":"middle",onClosed:n[1]||(n[1]=x=>t.$emit("closed"))},{default:m(()=>[c("div",{class:s(t.$style.root)},[c("div",{class:s(t.$style.title)},[e(C)?(o(),y(B,{key:0},{default:m(()=>[r(a(e(u)),1)]),_:1})):(o(),d("p",D,a(e(u)),1))],2),c("div",{class:s(t.$style.time)},[l(p,{time:t.announcement.createdAt},null,8,["time"]),t.announcement.updatedAt?(o(),d("div",E,[r(a(e(f).ts.updatedAt)+": ",1),l(p,{time:t.announcement.createdAt},null,8,["time"])])):M("",!0)],2),l(j,{text:e($)},null,8,["text"]),e(i)!=null?(o(),d("img",{key:e(i),src:e(i),alt:"attached image"},null,8,H)):M("",!0),l(N,{class:s(t.$style.gotIt),primary:"",full:"",onClick:n[0]||(n[0]=x=>A())},{default:m(()=>[r(a(e(f).ts.gotIt),1)]),_:1},8,["class"])],2)]),_:1},512)}}}),b="_root_vj3x1_1",G="_title_vj3x1_18",K="_time_vj3x1_25",R="_gotIt_vj3x1_29",U={root:b,title:G,time:K,gotIt:R},q={$style:U},L=w(S,[["__cssModules",q]]);export{L as default};
