import EsriPopupTemplate from "@arcgis/core/PopupTemplate";
import type EsriPopupContent from "@arcgis/core/popup/content/Content";
import type { FieldInfo } from "./FieldInfo.js";
import type { MediaInfo } from "./MediaInfo.js";
import type { PopupExpressionInfo } from "./PopupExpressionInfo.js";
export declare namespace PopupInfo {
    /**
     * Converts an ArcGIS Portal JSON representation of a popup template to its
     * Esri JavaScript API equivalent.
     *
     * @deprecated Use "json/*" modules instead.
     * @param json The popup template JSON to convert.
     */
    function toEsriApiPopupTemplate(json: PopupInfo): EsriPopupTemplate;
    /**
     * Converts an Esri JavaScript API PopupTemplate object to its ArcGIS Portal
     * JSON representation.
     *
     * @deprecated Use "json/*" modules instead.
     * @param popupTemplate The PopupTemplate object to convert.
     */
    function fromEsriApiPopupTemplate(popupTemplate: EsriPopupTemplate): PopupInfo;
}
/**
 * Defines the look and feel of pop-up windows when users click or query a
 * feature.
 *
 * See https://developers.arcgis.com/web-map-specification/objects/popupInfo/
 * and
 * https://developers.arcgis.com/web-scene-specification/objects/popupInfo/.
 *
 * @deprecated Use "json/*" modules instead.
 */
export interface PopupInfo {
    /**
     * A string that appears in the body of the pop-up window as a description.
     * This can contain a field name enclosed in `{}`, such as `{DETAILS}`.
     */
    description?: string;
    /**
     * List of Arcade expressions added to the pop-up.
     */
    expressionInfos?: PopupExpressionInfo[];
    /**
     * An array of {@link portal/FieldInfo!FieldInfo} objects defining how each
     * field in the dataset participates (or does not participate) in the pop-up
     * window. The order of the array is the order that fields are shown in the
     * pop-up window.
     */
    fieldInfos?: FieldInfo[];
    /**
     * Array of various mediaInfo to display. Can be of type image, piechart,
     * barchart, columnchart, or linechart. The order given is the order in
     * which is displays.
     */
    mediaInfos?: MediaInfo[];
    /**
     * An array of popupElement objects that represent an ordered list of popup
     * elements.
     */
    popupElements?: PopupElement[];
    /**
     * Indicates whether to enable related records if they exist on a layer.
     */
    relatedRecordsInfo?: RelatedRecordsInfo;
    /**
     * Determines whether attachments will be loaded for feature layers that
     * have attachments.
     */
    showAttachments?: boolean;
    /**
     * Appears at the top of the pop-up window as a title. This can contain a
     * field name enclosed in `{}`, such as `{NAME}`.
     */
    title?: string;
}
/**
 * Popup elements allow users to author popups, using multiple elements such as
 * tabular views, string description, media (charts and images), and attachments
 * of the attributes and control the order in which they appear. Specifically,
 * popupElements do the following: 1) provide the ability to explicitly add a
 * field/ value table in addition to a description, 2) allow adding multiple
 * description elements, and 3) allow a user to author and consume elements of a
 * popup in the order of their choosing.
 *
 * Each popupElement has a type property. This string value indicates the type
 * of popupElement used.
 *
 * See https://developers.arcgis.com/web-map-specification/objects/popupElement/
 * and
 * https://developers.arcgis.com/web-scene-specification/objects/popupElement/.
 *
 * @deprecated Use "json/*" modules instead.
 */
export interface PopupElement {
    /**
     * A dictionary of key value pairs representing attributes to be used
     * instead of fields and their values. This property is only used when the
     * element is of type expression and should be returned as part of the
     * arcade expression itself. This property allows passing arcade derived
     * attribute values into fields or media elements.
     */
    attributes?: Record<string, unknown>;
    /**
     * An optional string value describing the element in detail. This property
     * does not apply when the type is text or expression.
     */
    description?: string;
    /**
     * This property applies to elements of type relationship. An integer that
     * indicates the maximum number of records to display.
     */
    displayCount?: number;
    /**
     * This property applies to elements of type attachments and relationship. A
     * string value indicating how to display the attachment. Possible values
     * are, 'preview', and 'list' for attachments types, and 'list' for
     * relationship types. If list is specified, attachments show as links.
     */
    displayType?: string;
    /**
     * This property applies to elements of type expression. An Arcade
     * expression that defines the pop-up element content.
     */
    expressionInfo?: PopupExpressionInfo;
    /**
     * This property applies to elements of type fields. It is an array of
     * popupInfo.fieldInfo objects representing a field/value pair displayed as
     * a table within the popupElement. If the fieldInfos property is not
     * provided, the popupElement will display whatever is specified directly in
     * the popupInfo.fieldInfos property.
     */
    fieldInfos?: FieldInfo[];
    /**
     * This property applies to elements of type media. An array of
     * popupInfo.mediaInfo objects representing an image or chart for display.
     * If no mediaInfos property is provided, the popupElement will display
     * whatever is specified in the popupInfo.mediaInfo property.
     */
    mediaInfos?: MediaInfo[];
    /**
     * This property applies to elements of type relationship. Array of
     * orderByFields objects indicating the field display order for the related
     * records and whether they should be sorted in ascending 'asc' or
     * descending 'desc' order.
     */
    orderByFields?: OrderByFields[];
    /**
     * This property applies to elements of type relationship. The id of the
     * relationship as defined in the feature layer definition.
     */
    relationshipId?: number;
    /**
     * This property applies to elements of type text. This is string value
     * indicating the text to be displayed within the popupElement. If no text
     * property is provided, the popupElement will display whatever is specified
     * in the popupInfo.description property.
     */
    text?: string;
    /**
     * An optional string value indicating what the element represents. This
     * property does not apply when the type is text or expression.
     */
    title?: string;
    /**
     * String value indicating which element to use.
     */
    type?: PopupElementType;
}
/**
 * The type of the PopupElement.
 *
 * @deprecated Use "json/*" modules instead.
 */
export type PopupElementType = "attachments" | "fields" | "media" | "text" | "expression" | "relationship";
/**
 * The sort in the popupInfo for the parent feature. This impacts the sorting
 * order for the returned child records.
 *
 * See
 * {@link https://developers.arcgis.com/web-map-specification/objects/relatedRecordsInfo/}
 * {@link https://developers.arcgis.com/web-scene-specification/objects/relatedRecordsInfo/}.
 *
 * @deprecated Use "json/*" modules instead.
 */
export interface RelatedRecordsInfo {
    /**
     * Array of orderByFields objects indicating the field display order for the
     * related records and whether they should be sorted in ascending 'asc' or
     * descending 'desc' order.
     */
    orderByFields?: OrderByFields[];
    /**
     * Required boolean value indicating whether to display related records. If
     * true, client should const the user navigate to the related records.
     * Defaults to true if the layer participates in a relationship AND the
     * related layer/table has already been added to the map (either as an
     * operationalLayer or as a table).
     */
    showRelatedRecords: boolean;
}
/**
 * Object indicating the field display order for the related records and whether
 * they should be sorted in ascending or descending order.
 *
 * See
 * {@link https://developers.arcgis.com/web-map-specification/objects/orderByFields/}
 * {@link https://developers.arcgis.com/web-scene-specification/objects/orderByFields/}.
 *
 * @deprecated Use "json/*" modules instead.
 */
export interface OrderByFields {
    /**
     * The attribute value of the field selected that will drive the sorting of
     * related records.
     */
    field?: string;
    /**
     * Set the ascending (asc) or descending (desc) sort order of the returned
     * related records.
     */
    order?: string;
}
export declare namespace PopupContent {
    /**
     * Converts an ArcGIS Portal JSON representation of a popup template to its
     * Esri JavaScript API equivalent.
     *
     * @deprecated Use "json/*" modules instead.
     * @param json The popup template JSON to convert.
     */
    function toEsriApiPopupContent(json: PopupElement): EsriPopupContent;
    /**
     * Converts an Esri JavaScript API PopupElement object to its ArcGIS Portal
     * JSON representation.
     *
     * @deprecated Use "json/*" modules instead.
     * @param popupElement The PopupElement object to convert.
     */
    function fromEsriApiPopupContent(popupElement: EsriPopupContent): PopupElement;
    /**
     * Applies an ArcGIS Portal JSON representation of a Field to its Esri
     * JavaScript API representation.
     *
     * @param elementJson The field JSON to apply.
     * @param content The field object to apply the JSON to.
     */
    function applyToEsriApiPopupContent(elementJson: PopupElement, content: EsriPopupContent): void;
}
