UNPKG

@botonic/plugin-flow-builder

Version:

Use Flow Builder to show your contents

24 lines 986 B
export class ContentFieldsBase { constructor(id) { this.id = id; } static getTextByLocale(locale, text) { var _a; const result = text.find(t => t.locale === locale); return (_a = result === null || result === void 0 ? void 0 : result.message) !== null && _a !== void 0 ? _a : ''; } static getAssetByLocale(locale, asset) { var _a; const result = asset.find(i => i.locale === locale); return (_a = result === null || result === void 0 ? void 0 : result.file) !== null && _a !== void 0 ? _a : ''; } static getVideoByLocale(locale, video) { var _a; const result = video.find(v => v.locale === locale); return (_a = result === null || result === void 0 ? void 0 : result.url) !== null && _a !== void 0 ? _a : ''; } static getQueueByLocale(locale, queues) { return queues.find(queue => queue.locale === locale); } } //# sourceMappingURL=content-fields-base.js.map