import { ThemeUIEmpty } from '@theme-ui/css';
import { ResponsiveStyleValue, Theme } from 'theme-ui';
import { CSSLength } from './types';
/**
 * Returns whether the passed theme is the legacy theme (by checking the number of breakpoints it has).
 */
export declare const isLegacyTheme: (theme: Theme) => boolean;
/**
 * Returns whether the passed value is considered empty by Theme UI (null, undefined, or false).
 */
export declare function isEmpty<T>(value: T | ThemeUIEmpty): value is ThemeUIEmpty;
/**
 * Returns whether the passed value is not considered empty by Theme UI (any value other than null, undefined, or false).
 */
export declare function isNotEmpty<T>(value: T | ThemeUIEmpty): value is T;
type MapResponsiveFunction<T, U> = (value: T, index: number) => U;
/**
 * Helper function to apply miscellaneous transformations to a potentially responsive value (i.e. coming from a prop that accepts a
 * `ResponsiveStyleValue`), such as converting abstract values to concrete CSS ones for use in `sx`. The `initialValue` argument is
 * useful to handle cases where the specified value is a responsive tuple that starts with `null`, but rather than omitting the CSS
 * declaration until the first breakpoint where a value is provided, we want to set a default value. If the value comes from a prop,
 * that would normally be its default value, so it is recommended to actually define it when this function is called rather than at
 * the prop level (or in both places, which is unnecessarily WET) since the prop's default gets overridden when the consumer passes
 * an array. Returns a responsive tuple even if a single value is passed, for consistency.
 * Other functions are available for specific use cases:
 * - `mapResponsiveStyleTokenValue` to map tokens to their underlying values using `getTokenValue()`.
 * - `mapResponsiveStyleBooleanValue` to map booleans to e.g. strings, not considering `false` to be an empty value unlike Theme UI.
 * - `mapResponsiveStyleLengthValue` to map `CSSLength` values, which can be numbers, to their valid CSS representations.
 */
export declare function mapResponsiveStyleValue<T, I extends T, U>(value: ResponsiveStyleValue<T>, initialValue: ResponsiveStyleValue<I>, fn: MapResponsiveFunction<T, U>, options?: {
    considerFalseAsValue?: boolean;
}): (U | ThemeUIEmpty)[];
export declare function mapResponsiveStyleValue<T, I extends T>(value: ResponsiveStyleValue<T>, initialValue: ResponsiveStyleValue<I>): (T | ThemeUIEmpty)[];
/**
 * See `mapResponsiveStyleValue`.
 */
export declare function mapResponsiveStyleTokenValue<T extends string, I extends T, TT extends {
    [k: string]: string;
}>(value: ResponsiveStyleValue<T>, initialValue: ResponsiveStyleValue<I>, tokenType: TT): (ThemeUIEmpty | (T extends keyof TT ? TT[T] : string))[];
/**
 * See `mapResponsiveStyleValue`.
 */
export declare function mapResponsiveStyleBooleanValue<T extends boolean, I extends T, U>(value: ResponsiveStyleValue<T>, initialValue: ResponsiveStyleValue<I>, fn: MapResponsiveFunction<T, U>): (ThemeUIEmpty | U)[];
/**
 * See `mapResponsiveStyleValue`.
 */
export declare function mapResponsiveStyleLengthValue<T extends CSSLength, I extends T>(value: ResponsiveStyleValue<T>, initialValue?: ResponsiveStyleValue<I>): (string | ThemeUIEmpty | T)[];
export {};
//# sourceMappingURL=utils.d.ts.map