import type { TUserState, TWorkspaceState, TWorkspaceStateSettings } from "../../types/config"; import type { Result } from "../../types/error"; import type { TSurvey } from "../../types/survey"; import type { TWorkspaceStyling } from "../../types/workspace"; export declare const diffInDays: (date1: Date, date2: Date) => number; export declare const wrapThrowsAsync: (fn: (...args: A) => Promise) => (...args: A) => Promise>; /** * Detect whether a survey's segment has filters. Handles both the current * minimal shape (`{ id, hasFilters }`) and the legacy shape with a `filters` * array — older SDKs cached the full segment in AsyncStorage and may still be * read back here within the cache window after an SDK upgrade. */ export declare const surveyHasSegmentFilters: (survey: TSurvey) => boolean; /** * Filters surveys based on the displayOption, recontactDays, and segments * @param workspace - The workspace state * @param userState - The user state * @returns The filtered surveys */ export declare const filterSurveys: (workspace: TWorkspaceState, userState: TUserState) => TSurvey[]; export declare const getStyling: (settings: TWorkspaceStateSettings, survey: TSurvey) => TWorkspaceStyling | TSurvey["styling"]; export declare const getDefaultLanguageCode: (survey: TSurvey) => string | undefined; export declare const getLanguageCode: (survey: TSurvey, language?: string) => string | undefined; export declare const shouldDisplayBasedOnPercentage: (displayPercentage: number) => boolean; export declare const isNowExpired: (expirationDate: Date) => boolean; export declare const delayedResult: (value: T, ms: number) => Promise; //# sourceMappingURL=utils.d.ts.map