decord/source/components_native/premium/OutboundPromotionCard.tsx

140 lines
7.4 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 13030
// Function ID: 13031
2026-07-20 16:05:17 +00:00
// Name: TermsAndConditionsActionSheet
2026-08-25 06:04:03 +00:00
// Dependencies: [32, 19, 17, 676, 21, 4380, 712, 5265, 5503, 5502, 1236, 4376, 4370, 4315, 7790, 13031, 4745, 13032, 2009, 7788, 4815, 4347, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-25 06:04:03 +00:00
// Module 13030 (TermsAndConditionsActionSheet)
2026-08-24 06:08:38 +00:00
import ThemesDefault from "Themes" /* 712 */;
import getSystemLocale from "getSystemLocale" /* 1236 */;
2026-08-25 06:04:03 +00:00
import get_defaultRulesDefault from "get defaultRules" /* 4370 */;
import Text from "Text" /* 4376 */;
import RedesignBottomSheetTitleHeaderBase from "RedesignBottomSheetTitleHeaderBase" /* 5502 */;
import Background from "Background" /* 5503 */;
2026-08-24 06:08:38 +00:00
import closure_3 from "_slicedToArray" /* 32 */;
import closure_4 from "noop" /* 19 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import jsxProd from "jsxProd" /* 21 */;
2026-08-25 06:04:03 +00:00
import createCacheKey from "createCacheKey" /* 4380 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-20 16:05:17 +00:00
function TermsAndConditionsActionSheet(termsAndConditions) {
2026-07-29 08:29:29 +00:00
let obj = { header: null, children: null };
obj = { title: null };
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
obj[0] = intl.string(getSystemLocale.t.PdKWVT);
obj[0] = callback2(RedesignBottomSheetTitleHeaderBase.BottomSheetTitleHeader, obj);
obj = { style: callback4().termsAndConditionsText, variant: "text-sm/medium", children: null };
const tmp = callback4();
obj[2] = get_defaultRulesDefault.parse(termsAndConditions.termsAndConditions, false, { allowLinks: true });
obj[1] = callback2(Text.Text, obj);
return callback2(Background.BottomSheet, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
({ View: c5, Image: closure_6 } = get_ActivityIndicator);
2026-08-24 06:08:38 +00:00
({ jsx: error, jsxs: closure_8 } = jsxProd);
2026-07-29 08:29:29 +00:00
createCacheKey = { card: null, mainContainer: null, textContainer: null, imageContainer: null, image: null, title: null, subText: null, claimButton: null, moreDetails: null, termsAndConditionsText: null, buttonContainer: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { flex: 1, flexDirection: "column", paddingHorizontal: require("ME").USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING, paddingVertical: 12, backgroundColor: ThemesDefault.colors.BACKGROUND_BASE_LOW, marginTop: 8 };
2026-07-29 08:29:29 +00:00
createCacheKey[0] = createCacheKey;
createCacheKey[1] = { flex: 1, flexDirection: "row", alignItems: "center", justifyContent: "space-between" };
createCacheKey[2] = { flexDirection: "row", flexShrink: 1, alignItems: "center" };
2026-08-24 06:08:38 +00:00
createCacheKey[3] = { width: 32, height: 32, marginRight: 8, borderRadius: ThemesDefault.radii.xs, alignItems: "center", justifyContent: "center", backgroundColor: require("result").DARK_BLACK_500_LIGHT_PRIMARY_100 };
2026-07-29 08:29:29 +00:00
createCacheKey[4] = { width: 28, height: 28, resizeMode: "contain" };
createCacheKey[5] = { lineHeight: 20 };
createCacheKey[6] = { lineHeight: 18 };
createCacheKey[7] = { paddingHorizontal: 12 };
createCacheKey[8] = { marginLeft: 40 };
createCacheKey[9] = { paddingHorizontal: 16, paddingTop: 16 };
createCacheKey[10] = { flexGrow: 1, flexDirection: "row", marginLeft: 4, justifyContent: "flex-end" };
2026-08-24 06:08:38 +00:00
let closure_9 = createCacheKey.createStyles(createCacheKey);
let obj1 = { width: 32, height: 32, marginRight: 8, borderRadius: ThemesDefault.radii.xs, alignItems: "center", justifyContent: "center", backgroundColor: require("result").DARK_BLACK_500_LIGHT_PRIMARY_100 };
const result = require("set").fileFinishedImporting("components_native/premium/OutboundPromotionCard.tsx");
2026-07-20 16:05:17 +00:00
export default function OutboundPromotionCard(outboundPromotion) {
outboundPromotion = outboundPromotion.outboundPromotion;
const code = outboundPromotion.code;
2026-07-23 10:11:24 +00:00
let first;
2026-07-20 16:05:17 +00:00
let callback;
2026-08-24 06:08:38 +00:00
const tmp = callback4();
2026-07-23 10:11:24 +00:00
let obj = outboundPromotion(first[14]);
const promotionImageURL = obj.getPromotionImageURL(outboundPromotion.id, code(first[13])());
2026-07-29 08:29:29 +00:00
const tmp7 = code(first[15])(outboundPromotion, null != code);
2026-07-23 10:11:24 +00:00
const intl = outboundPromotion(first[10]).intl;
2026-07-20 16:05:17 +00:00
const formatToPlainString = intl.formatToPlainString;
2026-07-23 10:11:24 +00:00
const t = outboundPromotion(first[10]).t;
2026-07-20 16:05:17 +00:00
if (null != code) {
2026-07-29 08:29:29 +00:00
obj = { endDate: null };
obj[0] = tmp7;
2026-07-20 16:05:17 +00:00
let formatToPlainStringResult = formatToPlainString(t.VaD05h, obj);
} else {
2026-07-29 08:29:29 +00:00
obj = { endDate: null };
obj[0] = tmp7;
2026-07-23 10:11:24 +00:00
formatToPlainStringResult = formatToPlainString(t["/XWgfG"], obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const intl2 = tmp4(tmp2[10]).intl;
2026-07-20 16:05:17 +00:00
const string = intl2.string;
2026-07-29 08:29:29 +00:00
const t2 = tmp4(tmp2[10]).t;
2026-07-20 16:05:17 +00:00
if (null != code) {
2026-07-23 10:11:24 +00:00
let stringResult = string(t2["2cHUti"]);
2026-07-20 16:05:17 +00:00
} else {
stringResult = string(t2.O13yhz);
}
2026-07-29 08:29:29 +00:00
const tmp10 = callback(React.useState(false), 2);
first = tmp10[0];
callback = tmp10[1];
2026-07-20 16:05:17 +00:00
const items = [first, code, outboundPromotion];
const layoutEffect = React.useLayoutEffect(() => {
if (first) {
let obj = code(first[16]);
2026-07-29 08:29:29 +00:00
obj = { importer: null };
obj[0] = function importer() {
2026-08-24 06:08:38 +00:00
return closure_1_0(closure_1_2[18])(closure_1_2[17], closure_1_2.paths).then((arg0) => {
closure_0 = arg0.default;
2026-07-29 08:29:29 +00:00
return (arg0) => {
const obj = {};
const merged = Object.assign(arg0);
obj.onCancel = function onCancel() { ... };
2026-08-24 06:08:38 +00:00
obj.onClaim = closure_2_1(closure_2_2[19]).addClaimedOutboundPromotionCode;
obj.code = closure_1_1;
2026-07-29 08:29:29 +00:00
obj.outboundPromotion = closure_0;
2026-08-24 06:08:38 +00:00
return closure_2_7(closure_0, obj);
2026-07-29 08:29:29 +00:00
};
});
2026-07-20 16:05:17 +00:00
};
obj.openLazy(obj);
}
}, items);
2026-08-24 06:08:38 +00:00
obj1 = { style: tmp.card, children: null };
2026-07-29 08:29:29 +00:00
const obj2 = { style: tmp.mainContainer, children: null };
const tmp3 = code(first[13])();
2026-07-20 16:05:17 +00:00
const items1 = [callback2(closure_5, { style: tmp.imageContainer, children: callback2(closure_6, obj4) }), , ];
2026-07-29 08:29:29 +00:00
const obj5 = { style: tmp.textContainer, children: null };
const obj6 = { children: null };
const items2 = [callback2(outboundPromotion(first[11]).Text, { style: tmp.title, accessibilityRole: "header", variant: "text-md/semibold", color: "mobile-text-heading-primary", children: outboundPromotion.outboundTitle }), callback2(outboundPromotion(first[11]).Text, { style: tmp.subText, variant: "text-sm/medium", color: "text-default", children: formatToPlainStringResult })];
obj6[0] = items2;
obj5[1] = callback3(closure_5, obj6);
2026-07-20 16:05:17 +00:00
items1[1] = callback2(closure_5, obj5);
2026-07-29 08:29:29 +00:00
const obj9 = { style: tmp.buttonContainer, children: null };
2026-07-20 16:05:17 +00:00
const obj3 = { style: tmp.imageContainer, children: callback2(closure_6, obj4) };
2026-07-29 08:29:29 +00:00
const obj7 = { style: tmp.title, accessibilityRole: "header", variant: "text-md/semibold", color: "mobile-text-heading-primary", children: outboundPromotion.outboundTitle };
const obj8 = { style: tmp.subText, variant: "text-sm/medium", color: "text-default", children: formatToPlainStringResult };
obj9[1] = callback2(closure_5, { style: tmp.claimButton, children: callback2(outboundPromotion(first[20]).Button, obj11) });
2026-07-20 16:05:17 +00:00
items1[2] = callback2(closure_5, obj9);
2026-07-29 08:29:29 +00:00
obj2[1] = items1;
2026-07-20 16:05:17 +00:00
const items3 = [callback3(closure_5, obj2), ];
2026-07-29 08:29:29 +00:00
const obj12 = { children: null };
const obj13 = { style: tmp.moreDetails, variant: "text-sm/medium", children: null };
const intl3 = tmp4(tmp2[10]).intl;
obj13[2] = intl3.format(outboundPromotion(first[10]).t.sCm3Zb, {
2026-07-20 16:05:17 +00:00
onClick() {
2026-07-24 07:16:23 +00:00
let obj = code(first[21]);
2026-07-20 16:05:17 +00:00
obj.hideActionSheet();
obj = { termsAndConditions: outboundPromotion.outboundTermsAndConditions };
2026-07-29 08:29:29 +00:00
code(first[21]).openLazy(() => Promise.resolve(closure_10), "OutboundPromotionTermsAndConditions-" + outboundPromotion.id, obj);
2026-07-20 16:05:17 +00:00
}
});
2026-07-29 08:29:29 +00:00
obj12[0] = callback2(outboundPromotion(first[11]).Text, obj13);
2026-07-20 16:05:17 +00:00
items3[1] = callback2(closure_5, obj12);
2026-07-29 08:29:29 +00:00
obj1[1] = items3;
2026-07-20 16:05:17 +00:00
return callback3(closure_5, obj1);
};