/** * A date RANGE drawn as ONE control. The platform declares a range as two * `string`/`format: date` properties where the END names its START in `rangeStart`; * the answer stays the two date strings, nothing is recombined. Where a pair is * drawable as one control (below), `ObjectFields` renders this {@link DateRangeField} * — a group with the two ends' labels over two native date inputs — at the START's * slot and skips the END; otherwise the two properties draw as two ordinary date * fields (a documented, valid layout). * * {@link dateRangePairs} is the ONE definition of "drawable as one control", reused * by every surface so each surface's merge decision agrees. */ import type { ReactNode } from 'react'; import type { JsonSchema } from './types'; /** A START/END pair drawable as one range control, resolved off a page's properties. */ export interface DateRangePair { readonly startName: string; readonly startSchema: JsonSchema; readonly endName: string; readonly endSchema: JsonSchema; } /** * The date-range pairs among `properties` that are drawable as ONE control. A pair * qualifies when: the END names an existing sibling START in `rangeStart`; BOTH are * `format: date`; both carry the SAME `visibleWhen` (deep-equal, or both absent); AND * no OTHER field's `visibleWhen` names either end — otherwise merging the pair would * leave that field's predicate pointing at a control that no longer draws on its own, * so the pair stays two date fields (the documented degrade). `properties` is ONE * page's ordered list; a field is used in at most one pair. */ export declare function dateRangePairs(properties: readonly (readonly [string, JsonSchema])[]): readonly DateRangePair[]; export declare function DateRangeField({ pair, startValue, endValue, startRequired, endRequired, markRequired, startError, endError, onChangeStart, onChangeEnd, }: { readonly pair: DateRangePair; readonly startValue: unknown; readonly endValue: unknown; readonly startRequired: boolean; readonly endRequired: boolean; readonly markRequired: boolean; readonly startError: string | undefined; readonly endError: string | undefined; readonly onChangeStart: (value: unknown) => void; readonly onChangeEnd: (value: unknown) => void; }): ReactNode; //# sourceMappingURL=date-range-field.d.ts.map