import{B as e,Ct as t,Ft as n,H as r,It as i,Mt as a,Q as o,V as s,W as c,Z as l,_t as u,at as d,d as f,ft as p,ht as m,jt as h,mt as g,ot as _,pt as v,s as y,st as b,tt as x,wt as S}from"../chunks/BA99CCI5.js";import"../chunks/xihTtKlq.js";import"../chunks/DGo8yE5j.js";import{t as C}from"../chunks/CrqGeVR2.js";import{t as w}from"../chunks/BfBgZfCV2.js";import{t as T}from"../chunks/Dat55klv2.js";import{t as E}from"../chunks/DCohNkHF.js";import{t as D}from"../chunks/D8GKXqGk2.js";var O=c(`<div class="flex items-start gap-3"><!> <div class="text-sm"><div class="font-medium text-neutral-900 dark:text-neutral-100">The announcement file is malformed</div> <p class="mt-1 text-xs text-neutral-600 dark:text-neutral-400"> </p> <p class="mt-2 text-xs text-neutral-500 dark:text-neutral-500">Saving here will overwrite the broken file with the values below.</p></div></div>`),k=c(`<!> <div class="space-y-4"><!> <!></div>`,1);function A(c,A){a(A,!1);let j=()=>S(w,`$page`,M),[M,N]=t(),P=m(),F=m(),I=y(A,`data`,8),L=y(A,`form`,8);d(()=>j(),()=>{u(P,parseInt(j().params.id??`0`,10))}),d(()=>l(I()),()=>{u(F,I().announcement.title?`${I().announcement.title} · Edit`:`${I().database.name} · Announcement · Edit`)}),_(),f();var R=k(),z=v(R);E(z,{get title(){return o(F)}});var B=g(z,2),V=p(B),H=e=>{T(e,{padding:`md`,children:(e,t)=>{var a=O(),o=p(a);C(o,{class:`h-5 w-5 flex-shrink-0 text-yellow-600 dark:text-yellow-400`});var c=g(o,2),u=g(p(c),2),d=p(u,!0);i(u),n(2),i(c),i(a),b(()=>s(d,(l(I()),x(()=>I().parseError)))),r(e,a)},$$slots:{default:!0}})};e(V,e=>{l(I()),x(()=>I().parseError)&&e(H)});var U=g(V,2);D(U,{mode:`edit`,get databaseId(){return o(P)},get initial(){return l(I()),x(()=>I().announcement)},get form(){return L()}}),i(B),r(c,R),h(),N()}export{A as component};