import { JSONSchema } from "json-schema-typed";
import { CardEditorOptions, EntityEditorOptions } from "./internal/EditorOptions";
import type { IArcGISContext } from "../../types/IArcGISContext";
import { HubActionLink } from "../types/ActionLinks";
import { UiSchemaRuleEffects } from "../enums/uiSchemaRuleEffects";
import { UiSchemaMessageTypes } from "../enums/uiSchemaMessageTypes";
export interface IEditorConfig {
    schema: IConfigurationSchema;
    uiSchema: IUiSchema;
    defaults?: IConfigurationValues;
}
/**
 * Defines the possible editor type values - these correspond
 * to the supported/defined uiSchema configurations
 */
export type EntityEditorType = (typeof validEntityEditorTypes)[number];
export declare const validEntityEditorTypes: readonly ["hub:project:create", "hub:project:create2", "hub:project:edit", "hub:project:metrics", "hub:project:settings", "hub:content:edit", "hub:content:settings", "hub:content:settings:discussions", "hub:content:settings:discussions:compact", "hub:initiative:edit", "hub:initiative:create", "hub:initiative:create2", "hub:initiative:metrics", "hub:initiative:associations", "hub:initiative:settings", "hub:site:edit", "hub:site:create", "hub:site:followers", "hub:site:settings", "hub:site:assistant", "hub:site:settings:discussions", "hub:discussion:edit", "hub:discussion:create", "hub:discussion:settings", "hub:discussion:settings:discussions", "hub:page:edit", "hub:page:create", "hub:template:edit", "hub:group:edit", "hub:group:settings", "hub:group:settings:discussions", "hub:group:create:followers", "hub:group:create:association", "hub:group:create:view", "hub:group:create:edit", "hub:group:create", "hub:initiativeTemplate:edit", "hub:event:create", "hub:event:edit", "hub:event:registrants", "hub:user:settings", "hub:channel:create", "hub:channel:edit"];
/** Defines the possible editor type values for a stat card. These
 * correspond to the supported/defined uiSchema configurations. This should
 * have its own signature in the getEditorConfig function.
 */
export type StatCardEditorType = (typeof validStatCardEditorTypes)[number];
export declare const validStatCardEditorTypes: readonly ["hub:card:stat"];
/** Defines the possible editor type values for a follow card. These
 * correspond to the supported/defined uiSchema configurations. This should
 * have its own signature in the getEditorConfig function.
 */
export type FollowCardEditorType = (typeof validFollowCardEditorTypes)[number];
export declare const validFollowCardEditorTypes: readonly ["hub:card:follow"];
/** Defines the possible editor type values for an event gallery card. These
 * correspond to the supported/defined uiSchema configurations. This should
 * have its own signature in the getEditorConfig function.
 */
export declare const validEventGalleryCardEditorTypes: readonly ["hub:card:eventGallery"];
export type EventGalleryCardEditorType = (typeof validEventGalleryCardEditorTypes)[number];
/** Defines the possible editor type values for an embed card. These
 * correspond to the supported/defined uiSchema configurations. This should
 * have its own signature in the getEditorConfig function.
 */
export declare const validEmbedCardEditorTypes: readonly ["hub:card:embed"];
export type EmbedCardEditorType = (typeof validEmbedCardEditorTypes)[number];
export declare const validDiscussionSettingsEditorTypes: readonly ["hub:discussion:settings:discussions", "hub:site:settings:discussions", "hub:content:settings:discussions", "hub:content:settings:discussions:compact", "hub:group:settings:discussions"];
export type DiscussionSettingsEditorType = (typeof validDiscussionSettingsEditorTypes)[number];
/**
 * Defines the possible editor type values for any layout card. These
 * correspond to the supported/defined uiSchema configurations for cards.
 */
export type CardEditorType = (typeof validCardEditorTypes)[number];
export declare const validCardEditorTypes: readonly ["hub:card:stat", "hub:card:follow", "hub:card:eventGallery", "hub:card:embed"];
/**
 * All supported editor types - these "map"
 * to defined schema/uiSchema configurations
 */
export type EditorType = (typeof validEditorTypes)[number];
export declare const validEditorTypes: readonly ["hub:project:create", "hub:project:create2", "hub:project:edit", "hub:project:metrics", "hub:project:settings", "hub:content:edit", "hub:content:settings", "hub:content:settings:discussions", "hub:content:settings:discussions:compact", "hub:initiative:edit", "hub:initiative:create", "hub:initiative:create2", "hub:initiative:metrics", "hub:initiative:associations", "hub:initiative:settings", "hub:site:edit", "hub:site:create", "hub:site:followers", "hub:site:settings", "hub:site:assistant", "hub:site:settings:discussions", "hub:discussion:edit", "hub:discussion:create", "hub:discussion:settings", "hub:discussion:settings:discussions", "hub:page:edit", "hub:page:create", "hub:template:edit", "hub:group:edit", "hub:group:settings", "hub:group:settings:discussions", "hub:group:create:followers", "hub:group:create:association", "hub:group:create:view", "hub:group:create:edit", "hub:group:create", "hub:initiativeTemplate:edit", "hub:event:create", "hub:event:edit", "hub:event:registrants", "hub:user:settings", "hub:channel:create", "hub:channel:edit", "hub:card:stat", "hub:card:follow", "hub:card:eventGallery", "hub:card:embed"];
/**
 * An editor's module when dynamically imported depending on the EditorType. This
 * will always have a buildUiSchema function, and sometimes it will have a
 * buildDefaults function to override default values in the editor.
 */
export type IEditorModuleType = IEntityEditorModuleType | ICardEditorModuleType;
/**
 * An entity editor's module when dynamically imported depending on the EditorType. This
 * will always have a buildUiSchema function, and sometimes it will have a
 * buildDefaults function to override default values in the editor.
 */
export interface IEntityEditorModuleType {
    buildUiSchema: (i18nScope: string, options: EntityEditorOptions, context: IArcGISContext) => Promise<IUiSchema>;
    buildDefaults?: (i18nScope: string, options: EntityEditorOptions, context: IArcGISContext) => Promise<IConfigurationValues>;
}
/**
 * A card editor's module when dynamically imported depending on the EditorType. This
 * will always have a buildUiSchema function, and sometimes it will have a
 * buildDefaults function to override default values in the editor.
 */
export interface ICardEditorModuleType {
    buildUiSchema: (i18nScope: string, config: CardEditorOptions, context: IArcGISContext) => Promise<IUiSchema>;
    buildDefaults?: (i18nScope: string, options: CardEditorOptions, context: IArcGISContext) => Promise<IConfigurationValues>;
}
export interface IConfigurationSchema extends JSONSchema {
    type?: "object";
}
export interface IAsyncConfigurationSchema extends IConfigurationSchema {
    $async: true;
}
export interface IConfigurationValues {
    [key: string]: any;
}
export interface IChangeEventDetail {
    valid: boolean;
    values?: {
        [key: string]: any;
    };
    schema?: IConfigurationSchema;
    /**
     * The currently required properties in the schema
     */
    required?: Set<string>;
}
export interface IUiSchemaElement {
    type: string;
    id?: string;
    labelKey?: string;
    label?: string;
    options?: {
        [key: string]: any;
    };
    scope?: string;
    rule?: IUiSchemaRule;
    rules?: IUiSchemaRule[];
    elements?: IUiSchemaElement[];
    tooltip?: string;
}
export interface IUiSchema extends IUiSchemaElement {
    elements?: IUiSchemaElement[];
}
/**
 * Run-time configuration for UiSchema Elements
 */
export type UiSchemaElementOptions = Pick<IUiSchemaElement, "scope" | "options">;
export interface IUiSchemaComboboxItemGroup {
    label: string;
    items: IUiSchemaComboboxItem[];
}
export interface IUiSchemaComboboxItem {
    value: string;
    label?: string;
    icon?: string;
    selected?: boolean;
    children?: IUiSchemaComboboxItem[];
}
/**
 * A rule for a uiSchema element. This rule will be evaluated
 * to determine if the element should assume the provided effect.
 *
 * NOTE: `.condition` is deprecated and remains for backwards compatibility only. Please use `.conditions` instead.
 */
export interface IUiSchemaRule {
    effect: UiSchemaRuleEffects;
    condition?: IUiSchemaCondition;
    conditions?: Array<IUiSchemaCondition | boolean>;
}
export interface IUiSchemaCondition {
    scope?: string;
    schema: IConfigurationSchema;
}
/**
 * A message to display for a uiSchema element.
 *
 * NOTE: `.condition` is deprecated and remains for backwards compatibility only. Please use `.conditions` instead.
 * NOTE: `.display`, `.title`, `.titleKey`, `.kind`, `.alwaysShow` are deprecated and remain for backwards compatibility only. Please use the new method of notices in the configuration editor instead.
 */
export interface IUiSchemaMessage {
    type: UiSchemaMessageTypes;
    keyword?: string;
    label?: string;
    labelKey?: string;
    icon?: boolean | string;
    link?: HubActionLink;
    hidden?: boolean;
    conditions?: Array<IUiSchemaCondition | boolean>;
    allowShowBeforeInteract?: boolean;
    /** DEPRECATED */
    condition?: IUiSchemaCondition;
    display?: "message" | "notice";
    title?: string;
    titleKey?: string;
    kind?: "brand" | "danger" | "info" | "success" | "warning";
    alwaysShow?: boolean;
}
