/* The site's own pages (Community, Retreats, Resources, Organization, History), built in the admin from sections: GET /site-pages/:id for one page's sections, GET /site-pages for every page's section headings (the header's dropdowns, the footer, the side nav). */ import { useRecord, type Resource } from './useRecord.ts' import type { ContentBlock } from './useContent.ts' export type SitePageSection = { anchor: string title: string blurb?: string | null accent?: 'teal' | 'deep' | 'green' | 'amber' | null preset?: string | null scope_id?: string | null event_type?: string | null view?: string | null blocks: ContentBlock[] } export const useSitePage = (id: string): Resource<{ id: string; sections: SitePageSection[] }> => useRecord(`/site-pages/${id}`, 'page') export const useSitePageHeadings = (): Resource>> => useRecord('/site-pages', 'pages')