import{j as e}from"./query-CBHSEszN.js";import{a as n}from"./index-BXO8FbHk.js";const a=typeof window<"u"&&window.location.port==="8765"?"http://localhost:8765":"";class i extends Error{constructor(r,o){super(`HTTP ${r} from ${o}`),this.status=r,this.path=o,this.name="ApiError"}}async function u(t){try{const r=await fetch(`${a}${t}`,{credentials:"include"});if(!r.ok)throw new i(r.status,t);return r.json()}catch(r){throw r instanceof i?r:new i(0,t)}}const s=n.div`
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 48px 24px;
  gap: 12px;
  color: #8a8a9a;
  text-align: center;
`,c=n.div`
  opacity: 0.4;
`,d=n.p`
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #b0b0c0;
`,l=n.p`
  margin: 0;
  font-size: 13px;
`;function h({icon:t,heading:r,sub:o}){return e.jsxs(s,{role:"status","aria-live":"polite",children:[t&&e.jsx(c,{"aria-hidden":"true",children:t}),e.jsx(d,{children:r}),o&&e.jsx(l,{children:o})]})}const p=n.div`
  padding: 24px;
  color: #ff6b6b;
  font-size: 13px;
  background: rgba(255, 107, 107, 0.08);
  border: 1px solid rgba(255, 107, 107, 0.25);
  border-radius: 6px;
  margin: 16px;
`;function g({message:t}){return e.jsx(p,{role:"alert","aria-live":"assertive",children:t})}export{h as E,g as P,u as a};
