import { type FormSchema, type FormField, type OpenmrsObs, type RenderType } from '../types'; import { type Visit } from '@openmrs/esm-framework'; export declare function flattenObsList(obsList: OpenmrsObs[]): OpenmrsObs[]; export declare function hasRendering(field: FormField, rendering: RenderType): boolean; export declare function clearSubmission(field: FormField): void; export declare function gracefullySetSubmission(field: FormField, newValue: any, voidedValue: any): any; export declare function hasSubmission(field: FormField): boolean; export declare function isViewMode(sessionMode: string): sessionMode is "view" | "embedded-view"; export declare function parseToLocalDateTime(dateString: string): Date; /** * Returns `date` if it falls within the visit's start/stop window, otherwise the * visit's start datetime. This keeps default encounter datetimes valid when filling * forms against a past (stopped) visit via retrospective data entry; the backend * rejects encounters dated outside the visit window. */ export declare function getDateWithinVisitWindow(date: Date, visit?: Visit): Date; export declare function formatDateAsDisplayString(field: FormField, date: Date): string; /** * Creates a new copy of `formJson` with updated references at the page and section levels. * This ensures React re-renders properly by providing new references for nested arrays. */ export declare function updateFormSectionReferences(formJson: FormSchema): { name: string; pages: Array; processor: string; uuid: string; referencedForms: Array; encounterType: string; encounter?: string | import("..").OpenmrsEncounter; allowUnspecifiedAll?: boolean; defaultPage?: string; readonly?: string | boolean; inlineRendering?: "single-line" | "multiline" | "automatic"; markdown?: any; postSubmissionActions?: Array<{ actionId: string; enabled?: string; config?: Record; }>; formOptions?: { usePreviousValueDisabled: boolean; }; version?: string; translations?: Record; meta?: { programs?: { hasProgramFields?: boolean; [anythingElse: string]: any; }; }; }; /** * Converts a px value to a rem value * @param px - The px value to convert * @param fontSize - The font size to use for the conversion * @returns The rem value */ export declare function pxToRem(px: number, fontSize?: number): number; //# sourceMappingURL=common-utils.d.ts.map