import type { Brief, SectionId } from './types';

const KNOWN_SECTIONS: readonly SectionId[] = [
  'hero',
  'services',
  'about',
  'hours',
  'gallery',
  'testimonials',
  'faq',
  'contact',
  'footer',
] as const;

export function selectSections(brief: Brief): SectionId[] {
  return brief.structure.sections.filter((s): s is SectionId =>
    (KNOWN_SECTIONS as readonly string[]).includes(s),
  );
}