UNPKG

prodap-chatbot-domain

Version:

Classes utilizadas na resposta de todas as Intents do Assistente Virtual

23 lines 721 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class Dialog { constructor(intent = undefined, voting, dialogCode) { this.isComposite = true; this.voting = false; this.dialogCode = ''; this.messages = []; this.intent = intent; this.voting = voting ? voting : this.voting; this.dialogCode = dialogCode ? dialogCode : this.dialogCode; } add(component) { this.messages.push(component); return this; } remove(component) { const componentIndex = this.messages.indexOf(component); this.messages.splice(componentIndex, 1); } } exports.default = Dialog; //# sourceMappingURL=Dialog.js.map