decord/alpha/source/components_native/premium/PremiumBillingInfo.tsx
github-actions 72019a2d0c chore: update source for alpha 348.4
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5014.js (118.4 MB)
2026-09-25 08:38:05 +00:00

93 lines
4.6 KiB
TypeScript

// Module ID: 12915
// Function ID: 12916
// Name: PremiumBillingInfo
// Dependencies: [32, 19, 17, 1074, 21, 4829, 576, 4498, 4825, 1115, 4485, 12912, 6578, 6598, 12916, 6819, 2]
// Exports: default
// Module 12915 (PremiumBillingInfo)
import nativeDefault from "native" /* 576 */;
import useAnalyticsLocationsDefault from "useAnalyticsLocations" /* 6578 */;
import AnalyticsLocationDefault from "AnalyticsLocation" /* 6598 */;
import PremiumSubscriptionInvoice from "PremiumSubscriptionInvoice" /* 12912 */;
import BillingInformation from "BillingInformation" /* 12916 */;
import _slicedToArray from "module_32" /* 32 */;
import noop from "module_19" /* 19 */;
require = fn;
class GoogleManagementLink {
constructor(arg0) {
subscription = global.subscription;
tmp = closure_0;
tmp2 = closure_2;
obj = closure_0(closure_2[7]);
tmp3 = null;
if (obj.isGooglePlayBillingSupported()) {
tmp3 = null;
if (subscription.isPurchasedViaGoogle) {
tmp4 = jsx;
obj1 = { style: null, variant: "text-sm/medium", color: "text-link", children: null };
items = [];
items[0] = global.style;
obj1.style = items;
intl = tmp(tmp2[9]).intl;
obj5 = { onClick: null };
tmpResult = tmp(tmp2[10]);
str = "SUBSCRIPTION_MANAGEMENT";
obj5.onClick = tmpResult.getExternalSubscriptionMethodUrl(subscription.paymentGateway, "SUBSCRIPTION_MANAGEMENT");
obj1.children = intl.format(tmp(tmp2[9]).t["9NPc+O"], obj5);
tmp3 = jsx(tmp(tmp2[8]).Text, obj1);
}
}
return tmp3;
}
}
const View = fn(17).View;
const Constants = fn(1074);
({ SubscriptionStatusTypes: hasOwnProperty, USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING } = Constants);
const jsxProd = fn(21);
({ jsx: metroRequire, jsxs: closure_7 } = jsxProd);
const createStyles = fn(4829);
let obj2 = { title: { paddingHorizontal: USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING }, externalSubtext: { marginTop: 8, paddingHorizontal: USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING }, billingContainer: { backgroundColor: nativeDefault.colors.BACKGROUND_SURFACE_HIGH, padding: 16, marginTop: 8 }, billingRenewalInfo: { marginTop: 4 }, billingManageGoogle: { marginTop: 8 } };
let closure_8 = createStyles.createStyles(obj2);
const size = fn(2);
const result = size.fileFinishedImporting("components_native/premium/PremiumBillingInfo.tsx");
export default function PremiumBillingInfo(subscription) {
subscription = subscription.subscription;
const tmp = closure_8();
const obj = PremiumSubscriptionInvoice;
const obj2 = { subscriptionId: subscription.id, renewal: true, applyEntitlements: true, analyticsLocations: useAnalyticsLocationsDefault(), analyticsLocation: AnalyticsLocationDefault.PREMIUM_BILLING_INFO };
const first = _slicedToArray(PremiumSubscriptionInvoice.useGetSubscriptionInvoice({ subscriptionId: subscription.id, preventFetch: subscription.status !== constants.PAST_DUE }), 1)[0];
BillingInformation;
if (null == _slicedToArray(obj.useFetchSubscriptionInvoicePreview(obj2), 1)[0]) {
return null;
} else {
const externalManagementMessage = tmp2(6819).getExternalManagementMessage(subscription, { shouldAllowExternalManagement: true });
const obj5 = { style: subscription.style, children: null };
const obj6 = { style: tmp.title, accessibilityRole: "header", variant: "eyebrow", color: "text-default", children: null };
const intl = tmp2(1115).intl;
obj6.children = intl.string(tmp2(1115).t.Sb6wI1);
const items = [timestampProducer(tmp2(4825).Text, obj6), , ];
const obj7 = { style: tmp.billingContainer, children: null };
const obj8 = { variant: "text-md/semibold", children: null };
const intl2 = tmp2(1115).intl;
obj8.children = intl2.string(tmp2(1115).t.KXQjfc);
const items1 = [timestampProducer(tmp2(4825).Text, obj8), , ];
const obj9 = { style: tmp.billingRenewalInfo, variant: "text-sm/medium", children: tmp6 };
items1[1] = timestampProducer(tmp2(4825).Text, obj9);
const obj10 = { style: tmp.billingManageGoogle, subscription };
items1[2] = timestampProducer(GoogleManagementLink, obj10);
obj7.children = items1;
items[1] = React5(View, obj7);
let tmp11Result = null;
if (null != externalManagementMessage) {
const obj11 = { style: tmp.externalSubtext, variant: "text-sm/medium", children: externalManagementMessage };
tmp11Result = timestampProducer(tmp2(4825).Text, obj11);
}
items[2] = tmp11Result;
obj5.children = items;
return React5(View, obj5);
}
const obj4 = { subscriptionId: subscription.id, preventFetch: subscription.status !== constants.PAST_DUE };
};
export { GoogleManagementLink };