@botonic/plugin-flow-builder
Version:
Use Flow Builder to show your contents
27 lines • 931 B
JavaScript
import { __awaiter } from "tslib";
import { jsx as _jsx } from "react/jsx-runtime";
import { Video } from '@botonic/react';
import { trackOneContent } from '../tracking';
import { ContentFieldsBase } from './content-fields-base';
export class FlowVideo extends 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 __awaiter(this, void 0, void 0, function* () {
yield trackOneContent(request, this);
});
}
toBotonic(id) {
return _jsx(Video, { src: this.src }, id);
}
}
//# sourceMappingURL=flow-video.js.map