import { defineTemplate, describeSections } from "../../lib/content" import type { BlockSeed, TemplateDefinition } from "../../lib/types" import { blockLibrary } from "./definitions" import type { BrandData } from "./types" type BuilderOptions = Omit & { brand: BrandData; seed: BlockSeed[] } // Vorlage aus Bausteinen: „Marke & Kontakt“ ist die einzige feste Sektion, alles andere sind Bausteine, // die im Editor frei hinzugefügt, sortiert und entfernt werden. `seed` ist die Startaufstellung. export function defineBuilder({ brand, seed, ...template }: BuilderOptions) { const defaults = { brand } return defineTemplate({ ...template, sections: describeSections(defaults, { brand: "Marke & Kontakt" }), defaults, builder: { library: blockLibrary, seed }, }) }