UNPKG

@botonic/plugin-flow-builder

Version:

Use Flow Builder to show your contents

31 lines 1.14 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FlowVideo = void 0; const tslib_1 = require("tslib"); const jsx_runtime_1 = require("react/jsx-runtime"); const react_1 = require("@botonic/react"); const tracking_1 = require("../tracking"); const content_fields_base_1 = require("./content-fields-base"); class FlowVideo extends content_fields_base_1.ContentFieldsBase { constructor() { super(...arguments); this.src = ''; } static fromHubtypeCMS(component, locale) { const newVideo = new FlowVideo(component.id); newVideo.code = component.code; newVideo.src = this.getVideoByLocale(locale, component.content.video); newVideo.followUp = component.follow_up; return newVideo; } trackFlow(request) { return tslib_1.__awaiter(this, void 0, void 0, function* () { yield (0, tracking_1.trackOneContent)(request, this); }); } toBotonic(id) { return (0, jsx_runtime_1.jsx)(react_1.Video, { src: this.src }, id); } } exports.FlowVideo = FlowVideo; //# sourceMappingURL=flow-video.js.map