1import{f as r,t,L as i}from"./index-BpSoFu2o.js";import{u as d}from"./useServerFn-DTq8DeXb.js";import{u as p}from"./useQuery-CePkpoF7.js";import{B as o}from"./button-FUXS2oCd.js";import{E as x}from"./Eyebrow-BKZAxK0P.js";import{A as h}from"./ApplicationReview-BjVoGylN.js";import{g as u}from"./index-Ci38X4Ek.js";import{g as f}from"./applications.functions-BtUbIzdw.js";import{L as j}from"./loader-circle-BihD5kYU.js";import{A as y}from"./arrow-left-CdCPofM0.js";import"./createLucideIcon-DgpeMkxp.js";function R(){const{program:m}=r.useParams(),{id:e}=r.useSearch(),s=u(m),n=d(f),{data:a,isLoading:c,isError:l}=p({queryKey:["application-view",e],queryFn:()=>n({data:{id:e}}),enabled:!!e,retry:!1});return!e||l?t.jsxs("main",{className:"mx-auto flex min-h-[calc(100vh-4rem)] max-w-2xl flex-col items-center justify-center gap-3 px-6 text-center",children:[t.jsx("p",{className:"text-sm text-muted-foreground",children:"Couldn't load this application."}),t.jsx(o,{asChild:!0,variant:"outline",children:t.jsx(i,{to:"/dashboard",hash:"my-applications",children:"Back to dashboard"})})]}):c||!a?t.jsx("div",{className:"flex min-h-[calc(100vh-4rem)] items-center justify-center",children:t.jsx(j,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):t.jsxs("main",{className:"mx-auto max-w-3xl px-6 py-12",children:[t.jsx(o,{asChild:!0,variant:"ghost",size:"sm",className:"mb-6 -ml-2",children:t.jsxs(i,{to:"/dashboard",hash:"my-applications",children:[t.jsx(y,{className:"mr-1 h-3.5 w-3.5"}),"Back to dashboard"]})}),t.jsx(x,{children:s.eyebrow}),t.jsx("h1",{className:"mt-3 hexa-display text-3xl text-ink",children:s.form.title}),t.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:["Submitted ",a.submitted_at?new Date(a.submitted_at).toLocaleDateString():"â"]}),t.jsx("div",{className:"mt-8",children:t.jsx(h,{draft:a})})]})}export{R as component};
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.