decord/source/modules/virtual_currency/native/BalanceWidgetPillButton.tsx

64 lines
1.9 KiB
TypeScript
Raw Normal View History

// Module ID: 11132
// Function ID: 11133
2026-07-20 16:05:17 +00:00
// Name: BalanceWidgetPillButton
// Dependencies: [19, 21, 4989, 8870, 1114, 2]
2026-07-20 16:05:17 +00:00
// Module 11132 (BalanceWidgetPillButton)
import components_Button_Button from "components/Button/Button" /* 4989 */;
import _modDef8870 from "module_8870" /* 8870 */;
import noop from "module_19" /* 19 */;
2026-07-23 10:11:24 +00:00
require = fn;
2026-07-20 16:05:17 +00:00
class BalanceWidgetPillButton {
constructor(arg0) {
({ balance, variant } = global);
if (variant === undefined) {
variant = "tertiary";
}
flag = global.accessible;
if (flag === undefined) {
flag = true;
}
2026-07-29 08:29:29 +00:00
tmp2 = closure_0;
tmp3 = closure_2;
tmp = jsx;
obj = { variant, onPress: global.onPress, size: "sm", text: null, icon: null, accessible: null, accessibilityElementsHidden: null, importantForAccessibility: null, accessibilityLabel: null, disabled: null, loading: null };
2026-07-20 16:05:17 +00:00
str = undefined;
2026-07-29 08:29:29 +00:00
if (balance != null) {
2026-07-20 16:05:17 +00:00
str = balance.toString();
}
2026-07-29 08:29:29 +00:00
if (str == null) {
str = "";
2026-07-20 16:05:17 +00:00
}
obj.text = str;
obj.icon = closure_1(tmp3[3]);
obj.accessible = flag;
obj.accessibilityElementsHidden = !flag;
2026-07-20 16:05:17 +00:00
str2 = "no";
if (flag) {
str2 = "auto";
}
2026-07-29 08:29:29 +00:00
tmp4 = null === balance;
obj.importantForAccessibility = str2;
intl = tmp2(tmp3[4]).intl;
2026-07-29 08:29:29 +00:00
if (tmp4) {
stringResult = intl.string(tmp2(tmp3[4]).t.y0WGqP);
2026-07-20 16:05:17 +00:00
} else {
obj1 = { balance: null };
obj1.balance = balance.toString();
stringResult = intl.formatToPlainString(tmp2(tmp3[4]).t.zPaLL9, obj1);
2026-07-20 16:05:17 +00:00
}
obj.accessibilityLabel = stringResult;
obj.disabled = tmp4;
obj.loading = tmp4;
return tmp(closure_0(closure_2[2]).Button, obj);
2026-07-20 16:05:17 +00:00
}
}
const jsx = fn(21).jsx;
2026-07-20 16:05:17 +00:00
BalanceWidgetPillButton.displayName = "BalanceWidgetPillButton";
const size = fn(2);
const result = size.fileFinishedImporting("modules/virtual_currency/native/BalanceWidgetPillButton.tsx");
2026-07-20 16:05:17 +00:00
export default BalanceWidgetPillButton;
export { BalanceWidgetPillButton };