Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
82 lines
3.5 KiB
TypeScript
82 lines
3.5 KiB
TypeScript
// Module ID: 8975
|
|
// Function ID: 8976
|
|
// Name: LimitedTimeBadge
|
|
// Dependencies: [19, 17, 2026, 1182, 21, 4638, 576, 1115, 504, 4489, 7549, 4634, 2]
|
|
// Exports: default
|
|
|
|
// Module 8975 (LimitedTimeBadge)
|
|
import initialize from "initialize" /* 504 */;
|
|
import nativeDefault from "native" /* 576 */;
|
|
import shared from "shared" /* 4489 */;
|
|
import useCountdownDefault from "useCountdown" /* 7549 */;
|
|
import noop from "module_19" /* 19 */;
|
|
import LocaleStore from "LocaleStore" /* 2026 */;
|
|
import ThemeStore from "ThemeStore" /* 1182 */;
|
|
|
|
require = fn;
|
|
const View = fn(17).View;
|
|
const jsx = fn(21).jsx;
|
|
const createStyles = fn(4638);
|
|
let obj2 = { root: { borderRadius: nativeDefault.radii.md, paddingHorizontal: 8, paddingVertical: 2 }, backgroundDarkMode: null, backgroundLightMode: null };
|
|
let obj3 = { borderRadius: nativeDefault.radii.md, paddingHorizontal: 8, paddingVertical: 2 };
|
|
obj2.backgroundDarkMode = { backgroundColor: nativeDefault.colors.WHITE };
|
|
let obj4 = { backgroundColor: nativeDefault.colors.WHITE };
|
|
obj2.backgroundLightMode = { backgroundColor: nativeDefault.colors.BACKGROUND_MOD_STRONG };
|
|
let closure_7 = createStyles.createStyles(obj2);
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/collectibles/native/LimitedTimeBadge.tsx");
|
|
|
|
export default function LimitedTimeBadge(unpublishedAt) {
|
|
const tmp = closure_7();
|
|
const items = [ThemeStore];
|
|
const stateFromStores = initialize.useStateFromStores(items, () => shared.isThemeDark(theme.theme));
|
|
const items1 = [LocaleStore];
|
|
const items2 = ["en-US", "en-GB"];
|
|
const hasItem = items2.includes(initialize.useStateFromStores(items1, () => locale.locale));
|
|
({ days, hours } = useCountdownDefault(unpublishedAt.unpublishedAt, 1000, undefined, true));
|
|
if (hasItem) {
|
|
if (days > 1) {
|
|
const intl6 = tmp2(1115).intl;
|
|
const obj3 = { days };
|
|
let formatToPlainStringResult = intl6.formatToPlainString(tmp2(1115).t.DkxLY0, obj3);
|
|
} else {
|
|
if (days <= 1) {
|
|
if (hours > 0) {
|
|
const intl5 = tmp2(1115).intl;
|
|
const obj4 = { hours };
|
|
formatToPlainStringResult = intl5.formatToPlainString(tmp2(1115).t.WJieZ2, obj4);
|
|
}
|
|
}
|
|
const intl4 = tmp2(1115).intl;
|
|
formatToPlainStringResult = intl4.formatToPlainString(tmp2(1115).t.WJieZ2, { hours: 0 });
|
|
}
|
|
} else {
|
|
const intl = tmp2(1115).intl;
|
|
let sum = days + intl.string(tmp2(1115).t.QJyuxY);
|
|
const intl2 = tmp2(1115).intl;
|
|
let sum1 = hours + intl2.string(tmp2(1115).t["1LyF1h"]);
|
|
if (days <= 1) {
|
|
if (days > 1) {
|
|
const intl3 = tmp2(1115).intl;
|
|
sum1 = `0${tmp9(tmp2(1115).t["1LyF1h"])}`;
|
|
}
|
|
sum = sum1;
|
|
}
|
|
const items3 = [tmp.root, , ];
|
|
const obj5 = { style: null, children: null };
|
|
items3[1] = stateFromStores ? tmp.backgroundDarkMode : tmp.backgroundLightMode;
|
|
items3[2] = unpublishedAt.style;
|
|
obj5.style = items3;
|
|
let str2 = "text-overlay-light";
|
|
if (stateFromStores) {
|
|
str2 = "text-overlay-dark";
|
|
}
|
|
const obj6 = { color: str2, variant: "text-xs/bold", accessibilityLabel: null, allowFontScaling: false, children: null };
|
|
const intl7 = tmp2(1115).intl;
|
|
const obj7 = { daysLeft: days };
|
|
obj6.accessibilityLabel = intl7.formatToPlainString(tmp2(1115).t.TlZULM, obj7);
|
|
obj6.children = sum;
|
|
obj5.children = jsx(tmp2(4634).Text, { color: str2, variant: "text-xs/bold", accessibilityLabel: null, allowFontScaling: false, children: null });
|
|
return <View style={null}>{null}</View>;
|
|
}
|
|
};
|