import { BaseFieldBuilder } from "../../../features/modelBuilder/index.js"; import { CmsModelPlugin } from "../../../plugins/CmsModelPlugin.js"; import { FieldBuilderRegistry } from "../abstractions.js"; import type { CmsModelField, CmsModelLayoutCell } from "../../../types/index.js"; /** * Base class for all model builders, containing shared logic. * Concrete builders (PrivateModelBuilder, PublicModelBuilder) extend this. */ export declare abstract class BaseModelBuilder { protected registry: FieldBuilderRegistry.Interface; protected config: { modelId?: string; name?: string; tags?: string[]; }; protected isSingleEntry: boolean; protected fieldBuildersMap: Map>; constructor(registry: FieldBuilderRegistry.Interface); modelId(id: string): this; name(name: string): this; singleEntry(): this; tags(tags: string[]): this; fields(builder: (registry: FieldBuilderRegistry.Interface) => Record>): this; /** * Merge field operations from extension builder into existing builder. * This handles the case where multiple fields of the same type exist, * and we need to transfer operations from the temporary new builder * to the existing builder. * @internal */ private mergeFieldOperations; protected buildFields(): { fields: CmsModelField[]; layoutReplacements: Map; }; /** * Get tags with common defaults applied. * Always includes "type:model" and optionally "singleEntry". */ protected getTags(): string[]; /** * Build the final model configuration. * Must be implemented by concrete builders. */ abstract build(): TBuild; }