63 lines
1.6 KiB
TypeScript
63 lines
1.6 KiB
TypeScript
// Metro module 4363 (f4364).
|
|
import { Linking, NativeModules } from "react-native";
|
|
import { isAndroid } from "../../../utils/PlatformUtils";
|
|
import Module4364 from "../../../_bundle/Module4364";
|
|
export function sendSMS(a0, a1) {
|
|
if (isAndroid()) {
|
|
let body = a0.body;
|
|
if (body == null) {
|
|
body = "";
|
|
}
|
|
let recipients = a0.recipients;
|
|
if (recipients == null) {
|
|
recipients = [];
|
|
}
|
|
Module4364.sendSMS(body, recipients);
|
|
} else {
|
|
NativeModules.DCDSend.sendSMS(a0, a1);
|
|
}
|
|
}
|
|
export function sendMail(a0, a1) {
|
|
if (isAndroid()) {
|
|
let subject = a0.subject;
|
|
if (subject == null) {
|
|
subject = "";
|
|
}
|
|
let body = a0.body;
|
|
if (body == null) {
|
|
body = "";
|
|
}
|
|
let recipients = a0.recipients;
|
|
if (recipients == null) {
|
|
recipients = [];
|
|
}
|
|
Module4364.sendMail(subject, body, recipients);
|
|
} else {
|
|
NativeModules.DCDSend.sendMail(a0, a1);
|
|
}
|
|
}
|
|
export function canSendSMS() {
|
|
return isAndroid() ? Promise.resolve(Module4364.canSendSMS()) : NativeModules.DCDSend.canSendSMS();
|
|
}
|
|
export function canSendMail() {
|
|
return isAndroid() ? Promise.resolve(Module4364.canSendMail()) : NativeModules.DCDSend.canSendMail();
|
|
}
|
|
export function canOpenUrlScheme(a0) {
|
|
let r25;
|
|
if (isAndroid()) {
|
|
try {
|
|
r25 = Promise.resolve(Module4364.canOpenUrlScheme(a0));
|
|
} catch ($e) {
|
|
return Promise.resolve(false);
|
|
}
|
|
return r25;
|
|
}
|
|
return new Promise((c25056_0) => {
|
|
Linking.canOpenURL(`${a0}://app`).then((result) => {
|
|
c25056_0(result);
|
|
}).catch(() => {
|
|
c25056_0(false);
|
|
});
|
|
});
|
|
}
|