UNPKG

@react-native-kakao/channel

Version:
62 lines (61 loc) 2 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.addChannel = addChannel; exports.channels = channels; exports.chatChannel = chatChannel; exports.followChannel = followChannel; exports.getAddChannelUrl = getAddChannelUrl; exports.getChatChannelUrl = getChatChannelUrl; exports.openAddChannelUrl = openAddChannelUrl; exports.openChatChannelUrl = openChatChannelUrl; var _reactNative = require("react-native"); const LINKING_ERROR = "The package '@react-native-kakao/channel' doesn't seem to be linked. Make sure: \n\n" + _reactNative.Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n'; const isTurboModuleEnabled = global.__turboModuleProxy != null; const Module = isTurboModuleEnabled ? require('./spec/NativeKakaoChannel').default : _reactNative.NativeModules.RNCKakaoChannel; const Native = Module ? Module : new Proxy({}, { get() { throw new Error(LINKING_ERROR); } }); function followChannel(channelPublicId) { return Native.followChannel(channelPublicId); } function addChannel(channelPublicId) { return Native.addChannel(channelPublicId); } function getAddChannelUrl(channelPublicId) { return Native.getAddChannelUrl(channelPublicId); } function openAddChannelUrl(channelPublicId) { return Native.openAddChannelUrl(channelPublicId); } function chatChannel(channelPublicId) { return Native.chatChannel(channelPublicId); } function getChatChannelUrl(channelPublicId) { return Native.getChatChannelUrl(channelPublicId); } function openChatChannelUrl(channelPublicId) { return Native.openChatChannelUrl(channelPublicId); } function channels({ channelPublicIds = [] } = {}) { return Native.channels(channelPublicIds); } const KakaoChannel = { followChannel, addChannel, getAddChannelUrl, openAddChannelUrl, chatChannel, getChatChannelUrl, openChatChannelUrl, channels }; //# sourceMappingURL=index.js.map