import EsriFormTemplate from "@arcgis/core/form/FormTemplate";
import type { Domain } from "./Domain.js";
export declare namespace FormInfo {
    /**
     * Converts an ArcGIS Portal JSON representation of a form template to its
     * Esri JavaScript API equivalent.
     *
     * @deprecated Use "json/*" modules instead.
     * @param json The form template JSON to convert.
     */
    function toEsriApiFormTemplate(json: FormInfo): EsriFormTemplate;
    /**
     * Converts an Esri JavaScript API FormTemplate object to its ArcGIS Portal
     * JSON representation.
     *
     * @deprecated Use "json/*" modules instead.
     * @param formTemplate The FormTemplate object to convert.
     */
    function fromEsriApiFormTemplate(formTemplate: EsriFormTemplate): FormInfo;
}
/**
 * Defines the form configuration when a user edits a feature. See
 * {@link https://developers.arcgis.com/web-map-specification/objects/formInfo/}.
 *
 * @deprecated Use "json/*" modules instead.
 */
export interface FormInfo {
    /**
     * A string that appears in the body of the form as a description.
     */
    description?: string;
    /**
     * List of Arcade expressions used in the form.
     */
    expressionInfos?: FormExpressionInfo[];
    /**
     * An array of formElement objects that represent an ordered list of form
     * elements.
     */
    formElements?: (FormAttachmentElement | FormFieldElement | FormGroupElement | FormRelationshipElement)[];
    /**
     * A string that appears at the top of the form as a title.
     */
    title?: string;
}
/**
 * Arcade expression used in the form. See
 * {@link https://developers.arcgis.com/web-map-specification/objects/formExpressionInfo/}.
 *
 * @deprecated Use "json/*" modules instead.
 */
export interface FormExpressionInfo {
    /**
     * The Arcade expression.
     */
    expression?: string;
    /**
     * Unique identifier for the expression.
     */
    name?: string;
    /**
     * Return type of the Arcade expression. This can be determined by the
     * authoring client by executing the expression using a sample feature(s),
     * although it can be corrected by the user.
     */
    returnType?: "boolean";
    /**
     * Title of the expression.
     */
    title?: string;
}
/**
 * Defines how one or more attachments can participate in the form. When present
 * in the form, the user has the ability to upload an attachment specific to the
 * form element. See
 * {@link https://developers.arcgis.com/web-map-specification/objects/formAttachmentElement/}.
 *
 * @deprecated Use "json/*" modules instead.
 */
export interface FormAttachmentElement {
    /**
     * A string to identify the attachment(s). When a file is attached using the
     * form, this property is used to set the value of the keywords field for
     * the attachment. When a form is displaying existing attachments, this
     * property is used to query attachments using an exact match on the
     * keywords field.
     */
    attachmentKeyword?: string;
    /**
     * A string that describes the element in detail.
     */
    description?: string;
    /**
     * Indicates whether the attachments can be edited. If not present, the
     * default is true.
     */
    editable?: boolean;
    /**
     * The input user interface to use for the attachment.
     */
    inputType?: {
        /**
         * The input type identifier.
         */
        type: "attachment" | "audio" | "document" | "image" | "signature" | "video";
    };
    /**
     * A string value indicating what the element represents.
     */
    label?: string;
    /**
     * String value indicating which type of element to use.
     */
    type: "attachment";
    /**
     * A reference to an Arcade expression that returns a boolean value. When
     * this expression evaluates to true, the element is displayed. When the
     * expression evaluates to false the element is not displayed. If no
     * expression is provided, the default behavior is that the element is
     * displayed.
     */
    visibilityExpression?: string;
}
/**
 * Defines how a field in the dataset participates in the form. See
 * {@link https://developers.arcgis.com/web-map-specification/objects/formFieldElement/}.
 *
 * @deprecated Use "json/*" modules instead.
 */
export interface FormFieldElement {
    /**
     * A string that describes the element in detail.
     */
    description?: string;
    /**
     * The domain to apply to this field. If defined, it takes precedence over
     * domains defined in field, type, or subtype.
     */
    domain?: Domain;
    /**
     * A Boolean determining whether users can edit this form element. If not
     * supplied, the editable state is derived from the editable property of
     * referenced field in the service.
     */
    editable?: boolean;
    /**
     * A string containing the field name as defined by the feature layer.
     */
    fieldName?: string;
    /**
     * The input user interface to use for the element. If an input type is not
     * supplied or the client application does not understand the supplied input
     * type, the client application is responsible for defining the default user
     * interface.
     */
    inputType?: FormBarcodeScannerInput | FormComboBoxInput | FormDateTimePickerInput | FormRadioButtonsInput | FormSwitchInput | FormTextAreaInput | FormTextBoxInput;
    /**
     * A string indicating what the element represents. If not supplied, the
     * label is derived from the alias property in the referenced field in the
     * service.
     */
    label?: string;
    /**
     * A reference to an Arcade expression that returns a boolean value. When
     * this expression evaluates to true and the element is visible, the element
     * must have a valid value in order for the feature to be created or edited.
     * When the expression evaluates to false the element is not required. If no
     * expression is provided, the default behavior is that the element is not
     * required. If the referenced field is non-nullable, the required
     * expression is ignored and the element is always required.
     */
    requiredExpression?: string;
    /**
     * A string indicating which type of element to use.
     */
    type: "field";
    /**
     * A reference to an Arcade expression that returns a boolean value. When
     * this expression evaluates to true, the element is displayed. When the
     * expression evaluates to false the element is not displayed. If no
     * expression is provided, the default behavior is that the element is
     * displayed. Care must be taken when defining a visibility expression for a
     * non-nullable field i.e. to make sure that such fields either have default
     * values or are made visible to users so that they can provide a value
     * before submitting the form.
     */
    visibilityExpression?: string;
}
/**
 * Defines a container that holds a set of form elements that can be expanded,
 * collapsed, or displayed together. See
 * {@link https://developers.arcgis.com/web-map-specification/objects/formGroupElement/}.
 *
 * @deprecated Use "json/*" modules instead.
 */
export interface FormGroupElement {
    /**
     * A string that describes the element in detail.
     */
    description?: string;
    /**
     * An array of Form Element objects that represent an ordered list of form
     * elements. Nested group elements are not supported.
     */
    formElements?: (FormAttachmentElement | FormFieldElement | FormRelationshipElement)[];
    /**
     * Defines if the group should be expanded or collapsed when the form is
     * initially displayed. If not provided, the default value is expanded.
     */
    initialState?: "collapsed" | "expanded";
    /**
     * A string value indicating what the element represents.
     */
    label?: string;
    /**
     * String value indicating which type of element to use.
     */
    type: "group";
    /**
     * A reference to an Arcade expression that returns a boolean value. When
     * this expression evaluates to true, the element is displayed. When the
     * expression evaluates to false the element is not displayed. If no
     * expression is provided, the default behavior is that the element is
     * displayed.
     */
    visibilityExpression?: string;
}
/**
 * Defines how a relationship between feature layers and tables can participate
 * in the form. When present in the form, the user may have the option to add or
 * edit related records. See
 * {@link https://developers.arcgis.com/web-map-specification/objects/formRelationshipElement/}.
 *
 * @deprecated Use "json/*" modules instead.
 */
export interface FormRelationshipElement {
    /**
     * A string that describes the element in detail.
     */
    description?: string;
    /**
     * An integer that indicates the maximum number of records to display.
     */
    displayCount?: number;
    /**
     * A string that defines how the related records should be displayed.
     */
    displayType?: "list";
    /**
     * A Boolean determining whether users can edit this form element. If not
     * supplied the default value is true.
     */
    editable?: boolean;
    /**
     * A string value indicating what the element represents.
     */
    label?: string;
    /**
     * String value indicating which type of element to use.
     */
    type: "relationship";
    /**
     * A reference to an Arcade expression that returns a boolean value. When
     * this expression evaluates to true, the element is displayed. When the
     * expression evaluates to false the element is not displayed. If no
     * expression is provided, the default behavior is that the element is
     * displayed.
     */
    visibilityExpression?: string;
}
/**
 * Defines the desired user interface is a barcode or QR code scanner. If the
 * client does not support barcode scanning, a single-line text box should be
 * used. See
 * {@link https://developers.arcgis.com/web-map-specification/objects/formBarcodeScannerInput/}.
 *
 * @deprecated Use "json/*" modules instead.
 */
export interface FormBarcodeScannerInput {
    /**
     * This represents the maximum number of characters allowed. This only
     * applies for string fields. If not supplied, the value is derived from the
     * length property of the referenced field in the service.
     */
    maxLength?: number;
    /**
     * This represents the minimum number of characters allowed. This only
     * applies for string fields. If not supplied, the value is 0, meaning there
     * is no minimum constraint.
     */
    minLength?: number;
    /**
     * The input type identifier.
     */
    type: "barcode-scanner";
}
/**
 * Defines the desired user interface is a list of values in a drop-down that
 * supports typing to filter. Only one value can be selected at a time. See
 * {@link https://developers.arcgis.com/web-map-specification/objects/formComboBoxInput/}.
 *
 * @deprecated Use "json/*" modules instead.
 */
export interface FormComboBoxInput {
    /**
     * The text used to represent a null value.
     */
    noValueOptionLabel?: string;
    /**
     * Determines whether null value option is displayed. This only applies to
     * fields that support null values. If not provided, the default value is
     * false.
     */
    showNoValueOption?: boolean;
    /**
     * The input type identifier.
     */
    type: "combo-box";
}
/**
 * Defines the desired user interface is a calendar date picker. See
 * {@link https://developers.arcgis.com/web-map-specification/objects/formDatetimePickerInput/}.
 *
 * @deprecated Use "json/*" modules instead.
 */
export interface FormDateTimePickerInput {
    /**
     * Indicates if the datetime picker should provide an option to select the
     * time. If not provided, the default value is false.
     */
    includeTime?: boolean;
    /**
     * The maximum date to allow. The number represents the number of
     * milliseconds since epoch (January 1, 1970) in UTC.
     */
    max?: number;
    /**
     * The minimum date to allow. The number represents the number of
     * milliseconds since epoch (January 1, 1970) in UTC.
     */
    min?: number;
    /**
     * The input type identifier.
     */
    type: "datetime-picker";
}
/**
 * Defines the desired user interface is a radio button group. See
 * {@link https://developers.arcgis.com/web-map-specification/objects/formRadioButtonsInput/}.
 *
 * @deprecated Use "json/*" modules instead.
 */
export interface FormRadioButtonsInput {
    /**
     * The text used to represent a null value.
     */
    noValueOptionLabel?: string;
    /**
     * Determines whether null value option is displayed. This only applies to
     * fields that support null values. If not provided, the default value is
     * false.
     */
    showNoValueOption?: boolean;
    /**
     * The input type identifier.
     */
    type: "radio-buttons";
}
/**
 * Defines a desired user interface to present a binary switch, or toggle. This
 * should be used when selecting between two options. See
 * {@link https://developers.arcgis.com/web-map-specification/objects/formSwitchInput/}.
 *
 * @deprecated Use "json/*" modules instead.
 */
export interface FormSwitchInput {
    /**
     * The coded value when switch state is off.
     */
    offValue?: string | number;
    /**
     * The coded value when switch state is on.
     */
    onValue?: string | number;
    /**
     * The input type identifier.
     */
    type: "switch";
}
/**
 * Defines the desired user interface is a multi-line text area. See
 * {@link https://developers.arcgis.com/web-map-specification/objects/formTextAreaInput/}.
 *
 * @deprecated Use "json/*" modules instead.
 */
export interface FormTextAreaInput {
    /**
     * This represents the maximum number of characters allowed. If not
     * supplied, the value is derived from the length property of the referenced
     * field in the service.
     */
    maxLength?: number;
    /**
     * This represents the minimum number of characters allowed. If not
     * supplied, the value is 0, meaning there is no minimum constraint.
     */
    minLength?: number;
    /**
     * The input type identifier.
     */
    type: "text-area";
}
/**
 * Defines the desired user interface is a single-line text box. See
 * {@link https://developers.arcgis.com/web-map-specification/objects/formTextBoxInput/}.
 *
 * @deprecated Use "json/*" modules instead.
 */
export interface FormTextBoxInput {
    /**
     * This represents the maximum number of characters allowed. This only
     * applies for string fields. If not supplied, the value is derived from the
     * length property of the referenced field in the service.
     */
    maxLength?: number;
    /**
     * This represents the minimum number of characters allowed. This only
     * applies for string fields. If not supplied, the value is 0, meaning there
     * is no minimum constraint.
     */
    minLength?: number;
    /**
     * The input type identifier.
     */
    type: "text-box";
}
