1import{_ as g}from"./CnRo7uB-.js";import{_ as w}from"./BRsHvoYg.js";import{f as y,D as h,u as v,r as i,h as S,C as c,w as k,o,c as d,j as t,t as b,G as m}from"#entry";import{u as x}from"./Dy9pVEbO.js";import"./CI36eZX6.js";import"./CpvNRxAT.js";import"./DKLWY9DJ.js";const E={key:0,class:"text-slate-600 py-8"},C={key:1,class:"text-sm text-red-700"},G=y({__name:"[id]",setup(D){x({title:"Edit news article â DogHealthy",description:"Edit a DogHealthy news article.",path:"/admin/news",index:!1});const u=h(),p=v(),r=i(!0),n=i(""),l=i(null);S(async()=>{const a=String(u.params.id||""),{data:e,error:s}=await p.from("doghealthy_news").select("*").eq("id",a).maybeSingle();s||!e?n.value=s?.message||"Article not found":l.value=e,r.value=!1});const _=()=>m("/admin/news");return(a,e)=>{const s=g,f=w;return o(),c(f,{title:"Edit news article",subtitle:"Update copy, image, featured or publish status."},{default:k(()=>[t(r)?(o(),d("div",E,"Loadingâ¦")):t(n)?(o(),d("div",C,b(t(n)),1)):(o(),c(s,{key:2,article:t(l),onSaved:_,onCancel:e[0]||(e[0]=A=>("navigateTo"in a?a.navigateTo:t(m))("/admin/news"))},null,8,["article"]))]),_:1})}}});
1export{G 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.