import{M as B}from"./MkPagination-DzUgufpZ.js";import{aA as S,b as _,M as N,d as P,_ as T}from"./app-QjDgb7aF.js";import{b as V,E as n,j as e,g as H,i,k as a,p as s,F as I,G as R,q as c,H as d,D as p,J as k,u as f,f as h}from"./vue-Cm77DuTi.js";import"./charts-3gEHPHRq.js";import"./media-DuCIZ-3n.js";const $={class:"_title"},D={key:0},E={key:1},F={class:"_content"},U=["src"],j={key:0,class:"_footer"},q=V({__name:"announcements",setup(w){const g={endpoint:"announcements",limit:10};function M(r,o,l){r[l]={...o,isRead:!0},P("i/read-announcement",{announcementId:o.id})}const y=h(()=>[]),v=h(()=>[]);return S({title:_.ts.announcements,icon:"ph-megaphone-simple ph-bold ph-lg"}),(r,o)=>{const l=n("MkPageHeader"),m=n("MkTime"),b=n("Mfm"),C=n("MkSpacer"),x=n("MkStickyContainer");return e(),H(x,null,{header:i(()=>[a(l,{actions:y.value,tabs:v.value},null,8,["actions","tabs"])]),default:i(()=>[a(C,{"content-max":800},{default:i(()=>[a(B,{pagination:g,class:"ruryvtyk _content"},{default:i(({items:u})=>[(e(!0),s(I,null,R(u,(t,A)=>(e(),s("section",{key:t.id,class:"_card announcement"},[c("div",$,[r.$i&&!t.isRead?(e(),s("span",D,"🆕 ")):d("",!0),c("h3",null,p(t.title),1),a(m,{time:t.createdAt},null,8,["time"]),t.updatedAt?(e(),s("div",E,[k(p(f(_).ts.updatedAt)+": ",1),a(m,{time:t.createdAt},null,8,["time"])])):d("",!0)]),c("div",F,[a(b,{text:t.text},null,8,["text"]),t.imageUrl?(e(),s("img",{key:0,src:t.imageUrl},null,8,U)):d("",!0)]),r.$i&&!t.isRead?(e(),s("div",j,[a(N,{primary:"",onClick:G=>M(u,t,A)},{default:i(()=>[o[0]||(o[0]=c("i",{class:"ph-check ph-bold ph-lg"},null,-1)),k(" "+p(f(_).ts.gotIt),1)]),_:1},8,["onClick"])])):d("",!0)]))),128))]),_:1})]),_:1})]),_:1})}}}),Q=T(q,[["__scopeId","data-v-a8d3adb3"]]);export{Q as default};
//# sourceMappingURL=announcements-spuLRIVX.js.map
