1import{_ as $}from"./H7pu5BV8.js";import{_ as A}from"./H0bg0IrG.js";import{a as g}from"./Dcdj5DrC.js";/* empty css *//* empty css */import{d as M,M as P,u as L,c as N,r as m,w as E,g as F,a,z as C,b as t,V as W,f as e,F as Z,G as S,y,H as u,o as i,e as T,X as b}from"./cl7XfM0u.js";import{_ as U}from"./DlAUqK2U.js";const G={async getAllDonationNoticesWithImages(){return g.get("/cms/donationNotice/allWithImages")},async getDonationNoticeList(c={}){return g.get("/cms/donationNotice/list",{params:c})},async getDonationNoticeDetail(c){return g.get(`/cms/donationNotice/${c}`)},async getDonationNoticeImages(c){return g.get(`/cms/donationNotice/${c}/images`)},async getLatestDonationNotices(c=10){return g.get("/cms/donationNotice/list",{params:{pageSize:c,status:"0"}})}},H={class:"regulations-page min-h-screen bg-gray-50"},R={class:"bg-white sticky top-0 z-40 backdrop-blur-sm bg-white/95"},X={class:"cief-container"},q={class:"flex items-center max-w-6xl mx-auto justify-between py-4"},J={class:"bg-zinc-100 py-10"},K={class:"cief-container"},O={class:"max-w-6xl mx-auto"},Q={class:"mb-8 flex justify-center"},Y={class:"inline-flex bg-white rounded-lg shadow-sm p-2 space-x-2 flex-wrap justify-center"},ee=["onClick"],te={key:0,class:"flex justify-center items-center py-20"},oe={key:1,class:"bg-white rounded-lg shadow-lg p-8"},se={class:"text-2xl font-bold text-center text-gray-900 mb-8"},ne={class:"relative flex items-center justify-center"},ae=["disabled"],ie={class:"rounded-lg overflow-hidden mx-12",style:{"min-height":"600px"}},le=["src","alt"],re={key:1,class:"flex items-center justify-center h-96"},ce={class:"text-center"},de={class:"text-gray-500 text-lg"},ue=["disabled"],ge={key:0,class:"text-center mt-6 text-gray-600"},me={key:2,class:"bg-white rounded-lg shadow-lg p-8"},he={class:"flex flex-col items-center justify-center py-20"},fe={class:"text-gray-500 text-lg"},pe=M({__name:"announcements",setup(c){const p=P(),{locale:j}=L(),_=N(()=>j.value),z=[{id:"regulations",label:"è§ç« å¶åº¦"},{id:"reports",label:"年度æ¥å"},{id:"announcements",label:"æèµ å
¬ç¤º"}],h=m("announcements"),f=m([]),l=m(null),v=m(!0),n=m(1),r=N(()=>{var o;return(o=l.value)!=null&&o.images?[...l.value.images].sort((s,x)=>s.sort-x.sort):[]}),I=async()=>{try{v.value=!0;const o=await G.getAllDonationNoticesWithImages();o.code===200&&o.data&&(f.value=o.data,f.value.length>0&&w(f.value[0]))}catch(o){console.error("Failed to fetch donation notices:",o)}finally{v.value=!1}},w=o=>{l.value=o,n.value=1},D=()=>{n.value>1&&n.value--},B=()=>{r.value.length>0&&n.value<r.value.length&&n.value++};return E(h,o=>{o==="regulations"?b(p("/info/regulations")):o==="reports"?b(p("/info/reports")):o==="announcements"&&b(p("/info/announcements"))}),F(()=>{I()}),(o,s)=>{const x=$,V=A;return i(),a("div",H,[C(x,{title:"æèµ å
¬ç¤º","background-image":"/images/info/banner.png"}),t("section",R,[t("div",X,[t("div",q,[C(V,{items:z,modelValue:e(h),"onUpdate:modelValue":s[0]||(s[0]=d=>W(h)?h.value=d:null),class:"flex space-x-8"},null,8,["modelValue"])])])]),t("section",J,[t("div",K,[t("div",O,[t("div",Q,[t("div",Y,[(i(!0),a(Z,null,S(e(f),d=>{var k;return i(),a("button",{key:d.noticeId,onClick:_e=>w(d),class:T(["px-6 py-3 rounded-md font-medium transition-all duration-200",((k=e(l))==null?void 0:k.noticeId)===d.noticeId?"bg-amber-600 text-white shadow-md":"text-gray-700 hover:bg-gray-100"])},u(e(_)==="zh"?d.titleZh:d.titleEn),11,ee)}),128))])]),e(v)?(i(),a("div",te,s[1]||(s[1]=[t("div",{class:"loading-spinner"},null,-1)]))):e(l)?(i(),a("div",oe,[t("h2",se,u(e(_)==="zh"?e(l).titleZh:e(l).titleEn),1),t("div",ne,[e(r).length>0?(i(),a("button",{key:0,onClick:D,disabled:e(n)===1,class:"absolute left-0 z-10 p-3 rounded-full bg-white/90 hover:bg-white shadow-lg disabled:opacity-30 disabled:cursor-not-allowed transition-all transform -translate-x-1/2"},s[2]||(s[2]=[t("svg",{class:"w-8 h-8 text-gray-700",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)]),8,ae)):y("",!0),t("div",ie,[e(r)[e(n)-1]?(i(),a("img",{key:0,src:e(r)[e(n)-1].imageUrl,alt:`${e(_)==="zh"?e(l).titleZh:e(l).titleEn} - ${e(n)}`,class:"w-full h-auto"},null,8,le)):(i(),a("div",re,[t("div",ce,[s[3]||(s[3]=t("svg",{class:"w-16 h-16 text-gray-300 mx-auto mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12h6m-6 4h6m2 5.291A7.962 7.962 0 0112 15c-2.34 0-4.47-.881-6.08-2.33"})],-1)),t("p",de,u(o.$t("info.noContent")),1)])]))]),e(r).length>0?(i(),a("button",{key:1,onClick:B,disabled:e(n)===e(r).length,class:"absolute right-0 z-10 p-3 rounded-full bg-white/90 hover:bg-white shadow-lg disabled:opacity-30 disabled:cursor-not-allowed transition-all transform translate-x-1/2"},s[4]||(s[4]=[t("svg",{class:"w-8 h-8 text-gray-700",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)]),8,ue)):y("",!0)]),e(r).length>0?(i(),a("div",ge," 第 "+u(e(n))+" 页 / å
± "+u(e(r).length)+" 页 ",1)):y("",!0)])):(i(),a("div",me,[t("div",he,[
1s[5]||(s[5]=t("svg",{class:"w-16 h-16 text-gray-300 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12h6m-6 4h6m2 5.291A7.962 7.962 0 0112 15c-2.34 0-4.47-.881-6.08-2.33"})],-1)),t("p",fe,u(o.$t("info.noAnnouncements")),1)])]))])])])])}}}),Ce=U(pe,[["__scopeId","data-v-942b9ab5"]]);export{Ce as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.