import Async from "typescene-async"; import Style from "../../Style"; import ControlElement from "./ControlElement"; import { ComponentFactory, ValueOrAsync } from "../ComponentFactory"; import TextLabelFactory from "../TextLabelFactory"; /** Represents an image control */ export declare class Image extends ControlElement { /** Create an image element */ constructor(imageUrl?: string); /** Initialize an image control with given values */ static with: (values: Image.Initializer) => ComponentFactory; /** Initialize an image control with given URL */ static withUrl(imageUrl: ValueOrAsync): ComponentFactory; /** Initialize with given (observable) values; returns this */ initializeWith: (values: Image.Initializer) => this; /** Image URL (observed) */ imageUrl: string; /** Tooltip text (title attribute; observed) */ tooltipTitle: string; /** True if user is allowed to focus this image as an input control (observed) */ focusable: boolean; /** Set to false to expand horizontally within row (observed) */ shrinkwrap: boolean; /** Encapsulation of img element style (observed) */ readonly style_img: Style; /** True if a load error occurred (observable) */ hasError: boolean; /** Promise that resolves to true when the image is loaded, or if an error occurred (see .hasError) */ ready: Async.Promise; protected focus(): void; protected blur(): void; private _imgElement; private _resolveReady; } export declare namespace Image { /** Initializer for .with({ ... }) */ interface Initializer extends ControlElement.Initializer { /** Property initializer */ imageUrl: ValueOrAsync; /** Property initializer */ focusable?: ValueOrAsync; /** Property initializer */ style_img?: ValueOrAsync