/** * This Source Code is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright (c) Infonomic Company Limited */ import { type ReactNode } from 'react'; import type { AdminResourceConfig, Field } from '@byline/core'; export interface FormLayoutProps { fields: Field[]; adminConfig?: AdminResourceConfig; /** Which regions to render, in order. Default: both. */ regions?: ReadonlyArray<'main' | 'sidebar'>; /** 'split' = two columns (full page); 'stacked' = one column (embedded). */ variant?: 'split' | 'stacked'; collectionPath?: string; /** Content locale passed through to every field renderer. */ activeLocale?: string; /** Initial document, for field default values. */ initialData?: any; /** * Controlled active-tab state. Owned above the keyed `FormProvider` so tab * choices survive the remount a locale change triggers — see `useFormTabs`. */ activeTabBySet: Record; onTabChange: (tabSetName: string, tabName: string) => void; /** * Page-level sidebar widgets (path, tree placement, available locales), * rendered in the same sidebar column as the sidebar schema fields. The * embedded creation view passes nothing. */ sidebarSlot?: ReactNode; } /** * The layout walk: recursively dispatches each name in a region to the * appropriate primitive renderer or to ``. */ export declare const FormLayout: ({ fields, adminConfig, regions, variant, activeLocale, initialData, activeTabBySet, onTabChange, sidebarSlot, }: FormLayoutProps) => ReactNode;