import type { EntityBaseProperties } from "@vertigis/arcgis-extensions/Entity.js";
import type { Action } from "@vertigis/arcgis-extensions/support/Action";
import type { ItemRef } from "./ItemRef.js";
import type { ModelProperties } from "./ModelProperties.js";
/**
 * Configuration for a generic event listener.
 */
export interface EventListenerModelProperties extends ModelProperties {
    /**
     * A collection of event listener definitions. Each element has to be an
     * inline JSON defining an event listener definition item.
     */
    listeners?: EventListenerDefinitionProperties[];
}
/**
 * Properties for a generic event listener definition. Specifies an action to
 * execute whenever the target event is published. If the sender property is
 * assigned, the action will only be executed if the event is published with the
 * specified sender.
 */
export interface EventListenerDefinitionProperties extends EntityBaseProperties {
    /**
     * The name of the event to listen to. This value has to match the events
     * name that gets published (including its namespace prefix, e.g.
     * map.navigation-completed). All events are supported, both built in events
     * as well as custom events published through "viewer.publish-event" or the
     * Publish Event workflow activity.
     */
    event: string;
    /**
     * An optional reference to an item, that is to be used as a filter. If set,
     * only events published by the specified sender object, will cause the
     * action to be executed.
     */
    sender?: ItemRef;
    /**
     * The action to perform, when the specified events gets published.
     */
    action: Action;
    /**
     * A human-readable title for the event listener instance.
     */
    title?: string;
}
