import type { ConditionalFn, ObjectGroupNode, RefsStore } from '@vinejs/compiler/types'; import { OTYPE, COTYPE, PARSE, ITYPE } from '../../symbols.js'; import type { ParserOptions, SchemaTypes, WithJSONSchema } from '../../types.js'; import { type JSONSchema7 } from 'json-schema'; /** * GroupConditional represents a subset of object properties that are conditionally * validated and merged based on a runtime condition. This allows schemas to have * different required fields depending on the values in the object being validated. * * @template Properties - Record of property names to their schema types * @template Input - Expected input type for these properties * @template Output - Output type after validation and transformation * @template CamelCaseOutput - Output type with camelCase property names * * @example * vine.group.if( * (value) => value.shipping_required === true, * { * shipping_address: vine.string(), * shipping_method: vine.string() * } * ) */ export declare class GroupConditional, Input, Output, CamelCaseOutput> implements WithJSONSchema { #private; [ITYPE]: Input; [OTYPE]: Output; [COTYPE]: CamelCaseOutput; /** * Creates a new GroupConditional with a condition and properties. * * @param conditional - Function that returns truthy value when properties should be validated * @param properties - Properties to validate and merge when condition is true */ constructor(conditional: ConditionalFn>, properties: Properties); /** * Converts the conditional properties to JSON Schema format. * * @returns JSON Schema representation of this conditional's properties */ toJSONSchema(): JSONSchema7; /** * Compiles the conditional to a compiler node for validation. * * @param refs - Reference store for the compiler * @param options - Parser options * @returns Compiled conditional node */ [PARSE](refs: RefsStore, options: ParserOptions): ObjectGroupNode['conditions'][number]; }