80 lines
4.7 KiB
TypeScript
80 lines
4.7 KiB
TypeScript
/* Metro module 13695; source: modules/guild_role_subscriptions/useTrialIntervalOptions.tsx; dependencies: [31, 13668, 1880, 1244, 13694, 2] */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as PremiumConstantsModule from '../premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
|
|
import * as GuildRoleSubscriptionsConstantsModule from './GuildRoleSubscriptionsConstants.tsx'; /* Metro dependency 13668 */
|
|
|
|
function _fun104654(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13892:6, offset: 0x0229cb67, size: 158 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/guild_role_subscriptions/useTrialIntervalOptions.tsx');
|
|
exports.default = useTrialIntervalOptions;
|
|
function useTrialIntervalOptions(a0) { // fn#104655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13892:277, offset: 0x0229cc05, size: 44 bytes, params: 2, frame: 14
|
|
const env0_0 = a0;
|
|
return ReactModule.useMemo(_fun104656, [a0]);
|
|
function _fun104656() { // fn#104656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13892:331, offset: 0x0229cc31, size: 93 bytes, params: 1, frame: 13
|
|
var environment;
|
|
let value = environment.__proto__;
|
|
value = TIER_TRIAL_INTERVALS.map(_fun104657);
|
|
return {options: value, selectedOption: env0_0 != null ? value.find(_fun104658)?.value : env0_0};
|
|
function _fun104657(a0) { // fn#104657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13892:351, offset: 0x0229cc8e, size: 219 bytes, params: 2, frame: 21
|
|
var r3;
|
|
var intl;
|
|
var formatToPlainString;
|
|
var XfSsr1;
|
|
var object2;
|
|
let interval = a0.interval;
|
|
const value = environment.__proto__.__proto__;
|
|
let DAY = SubscriptionIntervalTypes.DAY;
|
|
if (interval !== DAY) {
|
|
r3 = (require(13694) /* metro dependency 13694: GuildRoleSubscriptionTypeUtils */).formatPlanIntervalDuration(a0);
|
|
} else if (a0.interval_count === 7) {
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
XfSsr1 = (require(1244) /* metro dependency 1244: indexNative */).t.XfSsr1;
|
|
object2 = {};
|
|
object2.defaultLimit = (require(13694) /* metro dependency 13694: GuildRoleSubscriptionTypeUtils */).formatPlanIntervalDuration(a0);
|
|
r3 = Reflect.apply(formatToPlainString, intl, [XfSsr1, object2]);
|
|
} else {
|
|
r3 = (require(13694) /* metro dependency 13694: GuildRoleSubscriptionTypeUtils */).formatPlanIntervalDuration(a0);
|
|
}
|
|
interval = a0.interval;
|
|
DAY = SubscriptionIntervalTypes.DAY;
|
|
return {value: a0, label: r3, isDefault: interval === DAY && a0.interval_count === 7};
|
|
}
|
|
|
|
function _fun104658(a0) { // fn#104658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13892:635, offset: 0x0229cd69, size: 78 bytes, params: 2, frame: 4
|
|
var r0;
|
|
var interval;
|
|
var interval_count;
|
|
let value = a0.value;
|
|
value = value != null;
|
|
if (value) {
|
|
value = a0.value;
|
|
interval = value.interval;
|
|
value = environment.__proto__;
|
|
value = interval === env1_0.interval;
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
if (r0) {
|
|
value = a0.value;
|
|
interval_count = value.interval_count;
|
|
value = environment.__proto__;
|
|
value = interval_count === env1_0.interval_count;
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun104654, 13695, [31, 13668, 1880, 1244, 13694,
|
|
2]) /* metro module 13695, dependencies: [31, 13668, 1880, 1244, 13694, 2] */;
|