import { ImageStyle } from 'react-native';
import { ImageURISource } from 'react-native';
import { ReactElement } from 'react';
import { StyleProp } from 'react-native';

/**
 * Prop value representing a dynamically loaded value which may not always be available, as expressed by its {@link ValueStatus}.
 *
 * @property status The current status of the value.
 * @property value The value, if available, or the previous value when currently loading.
 *
 * @typeParam T The type of the contained value.
 */
declare type DynamicValue<T> = {
    readonly status: ValueStatus.Available;
    readonly value: T;
} | {
    readonly status: ValueStatus.Unavailable;
    readonly value: undefined;
} | {
    readonly status: ValueStatus.Loading;
    readonly value: Option_2<T>;
};

declare function Image_2({ testID, source, style, color, screenReaderCaption, screenReaderHint, accessible, }: ImageProps): ReactElement | null;
export { Image_2 as Image }

declare interface ImageProps {
    source?: NativeImage;
    style?: StyleProp<ImageStyle | SvgImageStyle>;
    color?: string;
    testID?: string;
    accessible?: boolean;
    screenReaderCaption?: DynamicValue<string>;
    screenReaderHint?: DynamicValue<string>;
}

/**
 * Prop value representing images for the native platform.
 *
 * @see ImageURISource
 */
declare type NativeImage = Readonly<(ImageURISource & {
    name?: string;
}) | string | number>;

declare type Option_2<T> = T | undefined;

export declare interface SvgImageStyle extends ImageStyle {
    fill?: string;
    stroke?: string;
}

/**
 * Expresses the status of a {@link DynamicValue}.
 */
declare const enum ValueStatus {
    /**
     * The value is available, up to date, and can be used.
     */
    Available = "available",
    /**
     * The value is unavailable and won't be, at least until some significant change like user interaction happens.
     *
     * @example
     * When {@link DynamicValue} represents a value of a {@link https://docs.mendix.com/refguide/text#text-template | Text template}
     * with parameters dependent on the context, but the parent Data view has no object, then that value cannot be
     * computed and is marked as unavailable.
     */
    Unavailable = "unavailable",
    /**
     * The value is temporary unavailable or outdated.
     *
     * @example
     * When {@link DynamicValue} represents a value of a {@link https://docs.mendix.com/refguide/text#text-template | Text template}
     * with parameters dependent on the context, but the parent Data view is still waiting for its object to arrive or
     * is refreshing its Data source due to {@link https://docs.mendix.com/refguide/change-object#3-2-refresh-in-client | refresh in client},
     * then the value is marked as loading.
     */
    Loading = "loading"
}

export { }
