UNPKG

nativescript-plugin-botjet

Version:
43 lines 1.63 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var botjet_common_1 = require("./botjet.common"); var frame_1 = require("tns-core-modules/ui/frame"); var BotJetSDK = (function (_super) { __extends(BotJetSDK, _super); function BotJetSDK() { return _super !== null && _super.apply(this, arguments) || this; } BotJetSDK.launchChatWithConfig = function (config) { var options = BJChatViewControllerOptions.alloc().init(); options.clientId = config.clientId; options.botId = config.botId; if (config.title) { options.title = config.title; } if (typeof config.isAnonymous !== "undefined") { options.isAnonymous = config.isAnonymous; } if (config.accentColor) { options.accentColor = config.accentColor; } if (config.botIcon) { options.botIcon = config.botIcon; } if (config.host) { options.host = config.host; } if (typeof config.isLocationRequired !== "undefined") { options.isLocationRequired = config.isLocationRequired; } if (config.profileMeta) { options.profileMeta = config.profileMeta; } if (config.senderId) { options.senderId = config.senderId; } frame_1.topmost().currentPage.ios.presentViewControllerAnimatedCompletion(BJWebSDK.viewControllerWithConfig(options), true, null); }; return BotJetSDK; }(botjet_common_1.BotJetSDKCommon)); exports.BotJetSDK = BotJetSDK; //# sourceMappingURL=botjet.ios.js.map