import { NumberDisplayFormat } from "./numberFormatter";
/** References a container. */
export declare type ContainerRef = "default" | "modal" | {
    /** Indicates the name of the container. */
    name: string;
    /** Indicates the region to display the form within. */
    region?: string;
};
/** References a section. */
export declare type SectionRef = "header" | "footer" | {
    /** Indicates the section to bind to. */
    name: string;
};
/** References data for a data-based value. */
export interface DataRef {
    /** Indicates the type of data. */
    type: string;
    /** Discriminates this object from others. */
    format?: void;
    /** Indicates the data. */
    data?: any;
}
export interface DateRangeRef {
    /**
     * The lower end of the date range. The time is set to midnight local time,
     * based on the user's time-zone.
     * */
    startDate: Date;
    /**
     * The upper end of the date range. The time is set to midnight local time,
     * based on the user's time-zone.
     * */
    endDate: Date;
}
/** References data for a date-based value. */
export interface DateTimeRef {
    /** Indicates the format for the date/time value. */
    format: DateTimeFormat;
    /** Indicates the display form for the date/time value. */
    display: string;
    /** Indicates the value for the date/time value. */
    value: number;
}
export interface FilesRef {
    /** Discriminates this object from others. */
    format?: void;
    /** Indicates the files. */
    files: File[];
}
/** References a geometry. */
export interface GeometryRef {
    /** Indicates the format of the value. */
    format: GeometryFormat;
    /** Indicates the geometry. */
    geometry: {}[];
}
/** References one or more items within the element. */
export interface ItemsRef {
    /** The items that were selected. */
    items: Item[];
}
/** Indicates the number. */
export interface NumberRef {
    /** Indicates the format for the number. */
    format: NumberFormat;
    /** Indicates the display value. */
    display: string;
    /** Indicates the numeric value. */
    numeric: number;
}
/** References markdown for a markdown-based value. */
export interface MarkdownRef {
    markdown: string;
}
/**
 * Indicates how a form element's items should be laid out.
 */
export declare type Orientation = "horizontal" | "vertical";
export interface ScanRef {
    /** Type of barcode scanned. */
    scanType?: "barcode" | "qrcode";
    /** Type of entry method. */
    entryMethod: "camera" | "manual";
    /** Indicates the returned scanner data. */
    value: string;
}
/** References an error, warnings, and statuses. */
export interface StatusRef {
    /** missing - Input is missing. */
    /** invalid - Input is invalid. */
    /** failure - Input experienced a failure during validation or population. */
    /** pending - Input items are being populated. */
    /** trivial - Input items are empty, not relevant, not significant etc. */
    status: "missing" | "invalid" | "failure" | "pending" | "trivial";
}
/** References any kind of text. */
export declare type Text = string | MarkdownRef | StatusRef;
/**
 * Indicates how a form element's title should be positioned relative to its content.
 */
export declare type TitleLocation = "above" | "beside";
/** References any kind of value appropriate for a form element. */
export declare type Value = boolean | number | number[] | string | DataRef | DateRangeRef | DateTimeRef | FilesRef | GeometryRef | ItemsRef | NumberRef | ScanRef;
/** Types of matching that can be performed when finding an Item within a Form Element. */
export declare type ItemMatchType = "index" | "item" | "key" | "label" | "value";
/** References what kind of elements exist. */
export declare type ElementType = "DropDownEdit" | "DropDownList" | "GeometryPicker" | "Header";
/** References the format types. */
export declare type FormatRef = DateTimeFormat | NumberFormat | GeometryFormat | SectionFormat;
/** References the date/time type. */
export declare type DateTimeType = "date" | "time" | "datetime";
/** References the date/time format criteria. */
export declare type DateTimeFormat = "app" | "device" | {
    /** Indicates the locale for the date/time value. */
    locale: string;
    /** Indicates the time zone for the date/time value. */
    timezone: string;
};
/** References the number format criteria. */
export interface NumberFormat {
    /**
     * The 3-letter ISO 4217 currency code (e.g "USD", "CAD"). Required when
     * formatting a number using NumberFormat.CURRENCY or NumberFormat.ACCOUNTING.
     */
    currency?: string;
    /**
     * A custom display pattern. Required when formatting a number using NumberDisplayFormat.CUSTOM
     */
    customDisplayFormat?: string;
    /**
     * Indicates the display format - one of Number, Fixed Point, Currency,
     * Accounting, Percent or a custom format string like '##.##'.
     */
    displayFormat?: NumberDisplayFormat;
    /** Indicates the lower bound. */
    lowerBound?: number;
    /** Indicates the minimum increment/decrement and precision of values. */
    precision?: number;
    /** Indicates the step size which is the amount to increment/decrement. */
    step?: number;
    /** Indicates the upper bound. */
    upperBound?: number;
}
/** References geometry format. */
export declare type GeometryFormat = "polygon" | "polyline" | "point" | "polygon-freehand" | "polyline-freehand" | "extent" | "line";
export declare type SectionFormat = "unstyled-section" | "fieldset-section" | "basic-section" | "collapsible-section";
/** The `SectionFormat` to use when no value is specified. */
export declare const DEFAULT_SECTION_FORMAT = "unstyled-section";
/** References a two-dimensional size. */
export interface Size {
    /** The height. */
    height?: number;
    /** The width. */
    width?: number;
}
/** Defines a form. */
export interface Form {
    /** Indicates the defaults for the form. */
    defaults?: {
        container?: ContainerRef;
    };
    /** Indicates the elements for the form. */
    elements?: {
        [name: string]: Element;
    };
}
/** Defines any element used in a form. */
export interface Element {
    /**
     * True if this element should activate on the next render, false otherwise.
     * The meaning of "activate" can vary from element to element. In the case of
     * GeometryPicker, it means to click the "Add" button.
     */
    autoActivate?: boolean;
    /** Indicates that the element is checked or not. */
    checked?: boolean;
    /** Indicates that the element is collapsed or not. */
    collapsed?: boolean;
    /** Indicates the current item. */
    current?: string;
    /** Indicates the type name of the custom implementation (used by Custom form elements). */
    customType?: string;
    /** Indicates if the element is a default. */
    default?: boolean;
    /** Indicates the delay in milliseconds before acting on an edit (used by AutoComplete). */
    delay?: number;
    /** Indicates what element to react to when populating. */
    dependsOn?: string | boolean;
    /** Indicates the description for the element. */
    description?: Text;
    /** Indicates that the element is enabled or not. */
    enabled?: boolean;
    /** Indicates the error for the item. */
    error?: Text;
    /** Indicates a comma-separated list of file extensions and MIME types that you want to accept. */
    fileTypes?: string;
    /** Indicates the format of the value. */
    format?: FormatRef;
    /** Indicates that the element is hoisted or not. */
    hoisted?: boolean;
    /**
     * The order of this element in a single-dimensional column.
     * @deprecated Use rowNumber and rowIndex instead.
     */
    index?: number;
    /** Indicates the item label for items which are opaquely constructed such as geometries in the Geometry Picker. */
    itemLabel?: Text | Text[];
    /** Indicates the items. */
    items?: {
        [key: string]: Item;
    };
    /** Indicates the label for the element. */
    label?: Text;
    /** Indicates the locally unique identifier for application specific use. */
    luid?: string;
    /**
     * True if this element should support manual user entry, false otherwise (used by Scanner).
     */
    manualEntry?: boolean;
    /** Indicates the maximum number of characters allows in the input field */
    maxLength?: number;
    /** Indicates the minimum number of characters required for searches (used by AutoComplete). */
    minLength?: number;
    /** Indicates how the form element's items should be laid out. */
    orientation?: Orientation;
    /** Indicates that the element is in overlay mode. */
    overlay?: boolean;
    /** Indicates the prompt for the element. */
    prompt?: Text;
    /** Indicates if the element is read only. */
    readOnly?: boolean;
    /** Instructs any validation that the element is required. */
    require?: boolean;
    /**
     * The position of this element within its row. The lowest rowIndex appears first in the row, the highest last.
     */
    rowIndex?: number;
    /**
     * The row that this element belongs to. Row numbers increase downwards.
     */
    rowNumber?: number;
    /** Indicates the enclosing section. */
    section?: SectionRef;
    /** Indicates if the user can select one item, several items or no items. */
    selectionMode?: "single" | "multiple" | "none";
    /** Indicates whether to support barcode scanning, qrcode scanning or both (used by Scanner). If undefined (default) allow both. */
    scanType?: "barcode" | "qrcode" | "both";
    /** Indicates if the items can be filtered by the user. */
    showFilter?: boolean;
    /** Indicates if the minimum/maximum labels should be displayed by the user (used by NumberRangeSlider) */
    showMinMaxLabels?: boolean;
    /** Indicates if ticks should be displayed along the axis (used by NumberRangeSlider). */
    showTickMarks?: boolean;
    /** Indicates the element's size, which could be a one-dimensional number or a two-dimensional object. */
    size?: number | Size;
    /**
     * Indicates the current state.
     */
    state?: {};
    /** Indicates the style name to be used. */
    styleName?: string;
    /** Indicates the title for the element. */
    title?: Text;
    /** Indicates if the element's title should appear above or beside its content. */
    titleLocation?: TitleLocation;
    /** Indicates the tooltip for the element. */
    tooltip?: Text;
    /** Indicates the type of the element. */
    type?: ElementType | string;
    /** Indicates if the element triggers validation when submitting. */
    validates?: boolean;
    /** Indicates the current value. */
    value?: Value;
    /** Indicates whether the element is visible or not. */
    visible?: boolean;
    /** Indicates how the control wraps text. */
    wrap?: "hard" | "soft" | "off";
}
/** Defines an ad hoc item. */
export interface Item {
    /** Indicates the placement of the item. */
    index?: number;
    /** Indicates the label for the item. */
    label?: Text;
    /** Indicates the value for the item. */
    value?: Value;
    /** Indicates the enabled state for the item. */
    enabled?: boolean;
    /** Indicates the checked state for the item. */
    checked?: boolean;
    /** Indicates the visible state for the item. */
    visible?: boolean;
    /** Indicates if the item is a default. */
    default?: boolean;
    /** Indicates if the element triggers validation when submitting. */
    validates?: boolean;
    /** Indicates the tooltip for the element. */
    tooltip?: Text;
    /** Indicates the style name to be used. */
    styleName?: string;
}
export declare type EventType = "load" | "cancel" | "checked" | "changed" | "clicked" | "custom" | "dragged" | "suggest" | "submit" | "end" | "verify" | "validate" | "populate" | "prepare";
export interface Event {
    /** Indicates the name of the element raising the event. */
    name?: string;
    /** Indicates the item of the element raising the event. */
    item?: string;
    /** Indicates the type of the event. */
    type?: EventType;
    /** Indicates the routing key of the event. */
    routingKey?: string;
    /** Indicates the argument for the event. */
    argument?: Value;
    /** Indicates the value associated with the element or item. */
    value?: Value;
    /** Indicates the cancellation token fro the event. */
    cancellationToken?: PromiseLike<void>;
}
export interface GeometryState {
    /** Indicates the application specific context. */
    context?: {};
    /** Indicates the content. */
    content?: {};
    /** Indicates the checked state. */
    checked?: boolean;
    /** Indicates the focused state. */
    focused?: boolean;
    /** Indicates the pending state. */
    pending?: boolean;
}
/** Allows tracking the current state of the AutoComplete element between renders. */
export interface AutoCompleteState {
    /** The next action to be performed while pre-selecting a value. */
    nextAction: PreSelectionAction;
    /** True if the `select` element (the list of suggestions) is disabled, false otherwise. */
    selectDisabled: boolean;
    /** The key of the currently selected item in the list of suggestions. */
    selectValue: string;
}
/**
 * The category of content to be generated. This is relevant when content is
 * to be rendered in a place where not all categories of content are permitted.
 */
export declare enum HTMLContentCategory {
    /**
     * Elements belonging to the flow content category typically contain text or embedded content.
     * https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Flow_content
     */
    Flow = 0,
    /**
     * Phrasing content defines the text and the mark-up it contains. Runs of phrasing content make up paragraphs.
     * https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content
     */
    Phrasing = 1
}
/**
 * A set of actions that can be performed as part of pre-selecting an item.
 */
export declare enum PreSelectionAction {
    /**
     * No action is to be performed relating to pre-selection.
     */
    None = 0,
    /**
     * Suggestions need to be retrieved.
     */
    RetrieveSuggestions = 1,
    /**
     * The first item needs to be selected. This assumes the suggestions have already been retrieved.
     */
    SelectFirstItem = 2
}
