import type { AdaptiveStrategy, CacheConfig, CacheStrategy, CacheStrategyType, CacheableModel, ScheduleSettings } from "@metabase/embedding-sdk-react/dist/frontend/src/metabase-types/api";
import type { PerformanceTabId, StrategyData, StrategyLabel } from "./types";
export declare const scheduleSettingsToCron: (settings: ScheduleSettings) => string;
/** Returns null if we can't convert the cron expression to a ScheduleSettings object */
export declare const cronToScheduleSettings_unmemoized: (cron: string | null | undefined) => ScheduleSettings | null;
export declare const cronToScheduleSettings: (cron: string | null | undefined) => ScheduleSettings | null;
export declare const defaultCron: string;
export declare const hourToTwelveHourFormat: (hour: number) => number;
export declare const hourTo24HourFormat: (hour: number, amPm: number) => number;
type ErrorWithMessage = {
    data: {
        message: string;
    };
};
export declare const isErrorWithMessage: (error: unknown) => error is ErrorWithMessage;
/** To prevent UI jumpiness, ensure a minimum delay before continuing.
 * An example of jumpiness: clicking a save button results in
 * displaying a loading spinner for 10 ms and then a success message */
export declare const resolveSmoothly: (promises: Promise<any>[], timeout?: number) => Promise<[unknown, ...any[]]>;
export declare const getFrequencyFromCron: (cron: string) => string;
export declare const isValidStrategyName: (strategy: string) => strategy is CacheStrategyType;
export declare const getLabelString: (label: StrategyLabel, model?: CacheableModel) => string;
export declare const getShortStrategyLabel: (strategy?: CacheStrategy, model?: CacheableModel) => string | null;
export declare const getStrategyValidationSchema: (strategyData: StrategyData) => import("yup/lib/schema").AnySchema;
export declare const getFieldsForStrategyType: (strategyType: CacheStrategyType) => string[];
export declare const translateConfig: (config: CacheConfig, direction: "fromAPI" | "toAPI") => CacheConfig;
export declare const populateMinDurationSeconds: (strategy: AdaptiveStrategy) => {
    min_duration_seconds: number;
    type: "ttl";
    multiplier: number;
    min_duration_ms: number;
};
/** Translate a config from the API into a format the frontend can use */
export declare const translateConfigFromAPI: (config: CacheConfig) => CacheConfig;
/** Translate a config from the frontend's format into the API's preferred format */
export declare const translateConfigToAPI: (config: CacheConfig) => CacheConfig;
export declare const getPerformanceTabName: (tabId: PerformanceTabId) => string | undefined;
export declare const getDefaultValueForField: (strategyType: CacheStrategyType, fieldName?: string) => any;
export {};
