decord/source/design/components/TableRow/native/RowButton.native.tsx

135 lines
4.6 KiB
TypeScript
Raw Normal View History

2026-09-03 10:05:34 +00:00
// Module ID: 8378
// Function ID: 8379
2026-07-20 16:05:17 +00:00
// Name: RowButtonWrapper
2026-09-03 10:05:34 +00:00
// Dependencies: [19, 21, 4478, 709, 5614, 5608, 4217, 5610, 8379, 2]
2026-07-20 16:05:17 +00:00
2026-09-03 10:05:34 +00:00
// Module 8378 (RowButtonWrapper)
2026-09-02 09:53:35 +00:00
import ThemesDefault from "Themes" /* 709 */;
2026-09-03 10:05:34 +00:00
import TableRowInner from "TableRowInner" /* 5608 */;
import TableRowIcon from "TableRowIcon" /* 5614 */;
2026-08-24 06:08:38 +00:00
import closure_3 from "noop" /* 19 */;
import { jsx } from "jsxProd" /* 21 */;
2026-09-01 10:26:29 +00:00
import createCacheKey from "createCacheKey" /* 4478 */;
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
class RowButton {
constructor(arg0) {
flag = global.arrow;
if (flag === undefined) {
flag = true;
}
flag2 = global.disabled;
if (flag2 === undefined) {
flag2 = false;
}
str = global.variant;
if (str === undefined) {
str = "secondary";
}
({ icon, experimental_withBlurBackground } = global);
2026-07-29 08:29:29 +00:00
merged = Object.assign(global, Object.create(null));
2026-08-31 15:47:37 +00:00
tmp2 = icon;
2026-07-20 16:05:17 +00:00
if (null != icon) {
2026-08-31 15:47:37 +00:00
tmp3 = closure_3;
tmp2 = icon;
2026-08-24 06:08:38 +00:00
if (!closure_3.isValidElement(icon)) {
2026-07-20 16:05:17 +00:00
str2 = "translucent";
if (!experimental_withBlurBackground) {
str3 = "secondary";
str4 = "primary";
if ("primary" === str) {
str3 = "default";
}
str2 = str3;
}
2026-08-31 15:47:37 +00:00
tmp4 = jsx;
tmp5 = closure_0;
tmp6 = closure_2;
2026-07-29 08:29:29 +00:00
obj = { source: null, variant: null };
obj[0] = icon;
obj[1] = str2;
2026-08-31 15:47:37 +00:00
tmp2 = jsx(require("TableRowIcon").TableRowIcon, obj);
2026-07-20 16:05:17 +00:00
}
}
2026-08-31 15:47:37 +00:00
obj = { experimental_withBlurBackground, onPress: global.onPress, disabled: flag2 };
2026-07-20 16:05:17 +00:00
merged1 = Object.assign(merged);
2026-08-31 15:47:37 +00:00
obj1 = { icon: tmp2, arrow: flag, disabled: flag2, borderRadius: require("Themes").radii.xl };
2026-07-20 16:05:17 +00:00
merged2 = Object.assign(merged);
2026-08-31 15:47:37 +00:00
obj.children = jsx(require("TableRowInner").TableRowInner, obj1);
return jsx(RowButtonWrapper, obj);
2026-07-20 16:05:17 +00:00
}
}
2026-08-31 15:47:37 +00:00
function RowButtonWrapper(experimental_withBlurBackground) {
({ onPress, disabled, children } = experimental_withBlurBackground);
const merged = Object.assign(experimental_withBlurBackground, Object.create(null));
2026-07-23 10:11:24 +00:00
let sharedValue;
2026-08-24 06:08:38 +00:00
dependencyMap = undefined;
2026-07-20 16:05:17 +00:00
let React;
2026-08-31 15:47:37 +00:00
const tmp2 = callback();
2026-09-01 10:26:29 +00:00
let obj = merged(4217);
2026-07-29 08:29:29 +00:00
sharedValue = obj.useSharedValue(0);
2026-07-20 16:05:17 +00:00
const items = [sharedValue];
2026-07-23 10:11:24 +00:00
dependencyMap = React.useCallback(() => {
2026-07-20 16:05:17 +00:00
const result = sharedValue.set(1);
}, items);
const items1 = [sharedValue];
React = React.useCallback(() => {
const result = sharedValue.set(0);
}, items1);
2026-08-31 15:47:37 +00:00
if (experimental_withBlurBackground.experimental_withBlurBackground) {
2026-07-29 08:29:29 +00:00
obj = { shadow: "none", border: "none", start: true, end: true, onPress: null, onPressIn: null, onPressOut: null, style: null, disabled: null };
obj[4] = onPress;
obj[5] = function onPressIn(arg0) {
const onPressIn = merged.onPressIn;
if (onPressIn != null) {
onPressIn(arg0);
}
callback();
};
obj[6] = function onPressOut(arg0) {
const onPressOut = merged.onPressOut;
if (onPressOut != null) {
onPressOut(arg0);
}
callback2();
2026-07-20 16:05:17 +00:00
};
const items2 = [, ];
2026-07-29 08:29:29 +00:00
({ card: arr3[0], cardWithBlur: arr3[1] } = tmp2);
obj[7] = items2;
obj[8] = disabled;
2026-07-20 16:05:17 +00:00
const merged1 = Object.assign(merged);
2026-07-29 08:29:29 +00:00
obj.variant = "transparent";
obj = { pressed: null, children: null };
obj[0] = sharedValue;
obj[1] = children;
2026-09-03 10:05:34 +00:00
obj.children = tmp6(merged(8379).BackgroundBlurView, obj);
2026-08-31 15:47:37 +00:00
obj1 = obj;
2026-07-20 16:05:17 +00:00
} else {
2026-08-24 06:08:38 +00:00
obj1 = { shadow: "low", start: true, end: true, onPress: null, style: null, disabled: null };
2026-07-29 08:29:29 +00:00
obj1[3] = onPress;
obj1[4] = tmp2.card;
obj1[5] = disabled;
2026-07-20 16:05:17 +00:00
const merged2 = Object.assign(merged);
2026-08-31 15:47:37 +00:00
obj1.variant = "control-secondary";
obj1.border = "control-secondary";
2026-07-29 08:29:29 +00:00
obj1.children = children;
2026-07-20 16:05:17 +00:00
}
2026-09-03 10:05:34 +00:00
return jsx(merged(5610).InternalCard, obj1);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let closure_5 = createCacheKey.createStyles(() => {
let obj = { card: null, cardWithBlur: null };
2026-09-03 10:05:34 +00:00
obj = { padding: "y", borderTopStartRadius: "has", borderTopEndRadius: null, borderBottomStartRadius: "\u{1F60B}", borderBottomEndRadius: 6 };
2026-09-01 10:26:29 +00:00
obj[1] = ThemesDefault.modules.mobile.TABLE_ROW_BORDER_RADIUS;
obj[2] = ThemesDefault.modules.mobile.TABLE_ROW_BORDER_RADIUS;
obj[3] = ThemesDefault.modules.mobile.TABLE_ROW_BORDER_RADIUS;
obj[4] = ThemesDefault.modules.mobile.TABLE_ROW_BORDER_RADIUS;
2026-07-29 08:29:29 +00:00
obj[0] = obj;
obj[1] = { overflow: "hidden" };
2026-07-20 16:05:17 +00:00
return obj;
});
2026-07-23 10:11:24 +00:00
RowButton.Icon = require("TableRowIcon").TableRowIcon;
2026-08-24 06:08:38 +00:00
let result = require("set").fileFinishedImporting("design/components/TableRow/native/RowButton.native.tsx");
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
export const RowButtonIconProps = require("TableRowIcon").TableRowIconProps;
2026-07-20 16:05:17 +00:00
export { RowButton };