@botonic/plugin-flow-builder
Version:
Use Flow Builder to show your contents
7 lines • 359 B
JavaScript
import { getValueFromKeyPath } from '../utils';
export function conditionalBotVariable({ request, results, keyPath, }) {
var _a;
const botVariable = getValueFromKeyPath(request, keyPath);
return (_a = results.find(result => result === botVariable)) !== null && _a !== void 0 ? _a : 'default';
}
//# sourceMappingURL=conditional-bot-variable.js.map