"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PopupAction = void 0;
const internal_1 = require("../internal");
/**
* Represents a popup action. When clicked a popup dialog opens that shows the popup content
* @extends Action
*/
class PopupAction extends internal_1.Action {
/**
* Creates an instance of PopupAction.
* @param label - The label of the popup action.
* @param popupContent - The popup content associated with the popup action.
*/
constructor(label, popupContent) {
super(label);
this.type = 'popup';
this.popupContent = popupContent;
}
/**
* Deserialize nested object properties into corresponding class instances
*/
deserializeNestedProperties() {
super.deserializeNestedProperties();
if (this.popupContent) {
this.popupContent = internal_1.MessageUtil.deserializeMessage(this.popupContent);
}
}
/**
* Gets the popup content associated with the popup action.
* @returns The popup content associated with the popup action.
*/
getPopupContent() {
return this.popupContent;
}
/**
* Sets the popup content associated with the popup action.
* @param popupContent - The popup content to set.
* @returns The current instance of the PopupAction class.
*/
setPopupContent(popupContent) {
this.popupContent = popupContent;
return this;
}
}
exports.PopupAction = PopupAction;