decord/source/components_native/premium/PremiumBillingInfo.tsx

106 lines
4.5 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 7529
// Function ID: 7530
2026-07-20 16:05:17 +00:00
// Name: GoogleManagementLink
2026-08-05 07:35:12 +00:00
// Dependencies: [32, 19, 17, 676, 21, 4255, 712, 3914, 4251, 1236, 3901, 7525, 5595, 5615, 6760, 7530, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-05 07:35:12 +00:00
// Module 7529 (GoogleManagementLink)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray";
2026-07-29 08:29:29 +00:00
import "noop";
2026-07-23 10:11:24 +00:00
import { View } from "get ActivityIndicator";
import ME from "ME";
import jsxProd from "jsxProd";
2026-07-29 08:29:29 +00:00
import createCacheKey from "createCacheKey";
2026-07-23 10:11:24 +00:00
2026-07-20 16:05:17 +00:00
let USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING;
2026-07-29 08:29:29 +00:00
let c5;
2026-07-23 10:11:24 +00:00
let closure_6;
2026-07-29 08:29:29 +00:00
let error;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-20 16:05:17 +00:00
class GoogleManagementLink {
constructor(arg0) {
subscription = global.subscription;
2026-07-29 08:29:29 +00:00
tmp = closure_0;
tmp2 = closure_2;
2026-07-23 10:11:24 +00:00
obj = require("isPremiumGiftingSupported");
2026-07-29 08:29:29 +00:00
tmp3 = null;
2026-07-20 16:05:17 +00:00
if (obj.isGooglePlayBillingSupported()) {
2026-07-29 08:29:29 +00:00
tmp3 = null;
2026-07-20 16:05:17 +00:00
if (subscription.isPurchasedViaGoogle) {
2026-07-29 08:29:29 +00:00
tmp4 = jsx;
obj = { style: null, variant: "text-sm/medium", color: "text-link", children: null };
2026-07-20 16:05:17 +00:00
items = [];
items[0] = global.style;
2026-07-29 08:29:29 +00:00
obj[0] = items;
2026-07-23 10:11:24 +00:00
intl = require("getSystemLocale").intl;
2026-07-29 08:29:29 +00:00
obj1 = { onClick: null };
tmpResult = require("getPremiumPlanItem");
2026-07-20 16:05:17 +00:00
str = "SUBSCRIPTION_MANAGEMENT";
2026-07-29 08:29:29 +00:00
obj1[0] = tmpResult.getExternalSubscriptionMethodUrl(subscription.paymentGateway, "SUBSCRIPTION_MANAGEMENT");
obj[3] = intl.format(require("getSystemLocale").t["9NPc+O"], obj1);
tmp3 = jsx(require("Text").Text, obj);
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
return tmp3;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
({ SubscriptionStatusTypes: c5, USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING } = ME);
({ jsx: closure_6, jsxs: error } = jsxProd);
createCacheKey = { title: { paddingHorizontal: USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING }, externalSubtext: { marginTop: 8, paddingHorizontal: USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING }, billingContainer: null, billingRenewalInfo: null, billingManageGoogle: null };
createCacheKey = { backgroundColor: require("Themes").colors.BACKGROUND_SURFACE_HIGH, padding: 16, marginTop: 8 };
createCacheKey[2] = createCacheKey;
createCacheKey[3] = { marginTop: 4 };
createCacheKey[4] = { marginTop: 8 };
createCacheKey = createCacheKey.createStyles(createCacheKey);
2026-07-23 10:11:24 +00:00
const result = require("get ActivityIndicator").fileFinishedImporting("components_native/premium/PremiumBillingInfo.tsx");
2026-07-20 16:05:17 +00:00
export default function PremiumBillingInfo(subscription) {
subscription = subscription.subscription;
2026-07-29 08:29:29 +00:00
const tmp = createCacheKey();
2026-08-05 07:35:12 +00:00
let obj = require(7525) /* createSubscriptionInvoicePreview */;
obj = { subscriptionId: subscription.id, renewal: true, applyEntitlements: true, analyticsLocations: importDefault(5595)(), analyticsLocation: importDefault(5615).PREMIUM_BILLING_INFO };
2026-07-20 16:05:17 +00:00
const first = callback(obj.useFetchSubscriptionInvoicePreview(obj), 1)[0];
2026-08-05 07:35:12 +00:00
require(7525) /* createSubscriptionInvoicePreview */;
2026-07-20 16:05:17 +00:00
if (null == first) {
return null;
} else {
2026-08-05 07:35:12 +00:00
let tmp2Result = tmp2(6760);
2026-07-29 08:29:29 +00:00
const externalManagementMessage = tmp2Result.getExternalManagementMessage(subscription, { shouldAllowExternalManagement: true });
obj = { style: null, children: null };
obj[0] = subscription.style;
const obj1 = { style: null, accessibilityRole: "header", variant: "eyebrow", color: "text-default", children: null };
obj1[0] = tmp.title;
const intl = tmp2(1236).intl;
obj1[4] = intl.string(tmp2(1236).t.Sb6wI1);
2026-08-05 07:35:12 +00:00
const items = [callback2(tmp2(4251).Text, obj1), , ];
2026-07-29 08:29:29 +00:00
const obj2 = { style: null, children: null };
obj2[0] = tmp.billingContainer;
const obj3 = { variant: "text-md/semibold", children: null };
const intl2 = tmp2(1236).intl;
obj3[1] = intl2.string(tmp2(1236).t.KXQjfc);
2026-08-05 07:35:12 +00:00
const items1 = [callback2(tmp2(4251).Text, obj3), , ];
2026-07-29 08:29:29 +00:00
const obj4 = { style: null, variant: "text-sm/medium", children: null };
obj4[0] = tmp.billingRenewalInfo;
2026-08-05 07:35:12 +00:00
tmp2Result = tmp2(7530);
2026-07-29 08:29:29 +00:00
obj4[2] = tmp2Result.getBillingInformationStringNative(subscription, first, tmp6);
2026-08-05 07:35:12 +00:00
items1[1] = callback2(tmp2(4251).Text, obj4);
2026-07-29 08:29:29 +00:00
const obj5 = { style: null, subscription: null };
obj5[0] = tmp.billingManageGoogle;
obj5[1] = subscription;
items1[2] = callback2(GoogleManagementLink, obj5);
obj2[1] = items1;
items[1] = callback3(View, obj2);
let tmp11Result = null;
2026-07-20 16:05:17 +00:00
if (null != externalManagementMessage) {
2026-07-29 08:29:29 +00:00
const obj6 = { style: null, variant: "text-sm/medium", children: null };
obj6[0] = tmp.externalSubtext;
obj6[2] = externalManagementMessage;
2026-08-05 07:35:12 +00:00
tmp11Result = callback2(tmp2(4251).Text, obj6);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items[2] = tmp11Result;
obj[1] = items;
return callback3(View, obj);
2026-07-20 16:05:17 +00:00
}
};
export { GoogleManagementLink };