import { type ArrayOrValue } from '../array/array'; import { type Maybe, type MaybeMap } from '../value/maybe.type'; import { type ModifierFunction } from '../value/modifier'; import { type ModelMapFunction, type ModelMapFunctions } from './model.conversion'; export type ModelInputDataModifier = { modifyData: ModifierFunction; }; export type ModelInputModelModifier = { modifyModel: ModifierFunction; }; export type ModelModifier = ModelInputModelModifier & ModelInputDataModifier; export type PartialModelModifier = Partial>>; /** * Merges one or more partial model modifiers into a single {@link PartialModelModifier}. * * Combines all `modifyData` and `modifyModel` functions from the input modifiers into unified modifier functions. * * @param input - One or more partial model modifiers to merge * @returns A single merged modifier with combined `modifyData` and `modifyModel` functions */ export declare function maybeMergeModelModifiers(input: ArrayOrValue>): PartialModelModifier; export interface ModifyModelMapFunctionsConfig { readonly mapFunctions: ModelMapFunctions; /** * Partial model modifiers to use. */ readonly modifiers: ArrayOrValue>; /** * Provides a default value for both copyModel and copyData. */ readonly copy?: boolean; /** * Whether or not to copy the input model before applying modifiers. * * Defaults to true. */ readonly copyModel?: boolean; /** * Whether or not to copy the input data before applying modifiers. * * Defaults to true. */ readonly copyData?: boolean; } /** * Wraps existing {@link ModelMapFunctions} with modifier functions that are applied to the input before conversion. * * Optionally copies the input object before modification to avoid mutating the original. * * @param config - Configuration with the base map functions, modifiers, and copy options * @returns New model map functions with modifiers applied before each conversion */ export declare function modifyModelMapFunctions(config: ModifyModelMapFunctionsConfig): ModelMapFunctions; /** * Wraps a single {@link ModelMapFunction} with a modifier that is applied to the input before the map function runs. * * When `copy` is true (default), the input is shallow-copied before modification to avoid mutating the original. * If no modifier is provided, the original map function is returned unchanged. * * @param mapFn - The base map function to wrap * @param modifyModel - Optional modifier to apply before mapping * @param copy - Whether to shallow-copy the input before modifying; defaults to true * @returns The wrapped map function, or the original if no modifier is provided */ export declare function modifyModelMapFunction(mapFn: ModelMapFunction, modifyModel: Maybe>, copy?: boolean): ModelMapFunction;