import type { Questionnaire, QuestionnaireItem } from 'fhir/r4'; import type { EnableWhenExpressions, EnableWhenItems } from '../interfaces/enableWhen.interface'; interface isHiddenByEnableWhensParams { linkId: string; enableWhenIsActivated: boolean; enableWhenItems: EnableWhenItems; enableWhenExpressions: EnableWhenExpressions; parentRepeatGroupIndex?: number; } export declare function isHiddenByEnableWhen(params: isHiddenByEnableWhensParams): boolean; /** * Check if qItem is a repeat item AND if it isn't a checkbox item * Note: repeat checkbox items are rendered as multi-select checkbox instead of being rendered as a traditional repeat item * * @author Sean Fong */ export declare function isRepeatItemAndNotCheckbox(qItem: QuestionnaireItem): boolean; /** * Check if qItem is a checkbox item */ export declare function isCheckbox(qItem: QuestionnaireItem): boolean; export declare function getXHtmlStringFromQuestionnaire(questionnaire: Questionnaire): string | null; /** * Recursively traverses all QuestionnaireItems in a questionnaire and produces a map of (with `item` omitted). */ export declare function getLinkIdPartialItemMap(questionnaire: Questionnaire): Record>; /** * Recursively traverse a QuestionnaireItem and all its children, collecting a tuple [linkId, QItem] (with `item` omitted). * The resulting array can be used to construct a flat map of linkId to node metadata (excluding their child items, for memory efficiency). */ export declare function getLinkIdPartialTuplesFromItemRecursive(qItem: QuestionnaireItem): [string, Omit][]; export declare function getLinkIdPreferredTerminologyServerTuples(questionnaire: Questionnaire): [string, string][]; export type CollapsibleType = 'default-open' | 'default-closed'; export declare function getGroupCollapsible(qItem: QuestionnaireItem): CollapsibleType | null; /** * Plain function to determine if a QuestionnaireItem is hidden via item.hidden, enableWhens, enableWhenExpressions. * When checking for repeating group enableWhen items, the parentRepeatGroupIndex should be provided. * Recommended to use the `useHidden` hook instead for React components, where applicable. * * @author Sean Fong */ export declare function isItemHidden(qItem: QuestionnaireItem, enableWhenIsActivated: boolean, enableWhenItems: EnableWhenItems, enableWhenExpressions: EnableWhenExpressions, enableWhenAsReadOnly: boolean | Set, parentRepeatGroupIndex?: number): boolean; export {};