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

133 lines
4.6 KiB
TypeScript
Raw Normal View History

// Module ID: 8665
// Function ID: 8666
// Name: RowButton
// Dependencies: [19, 21, 4605, 576, 5661, 5655, 4341, 5657, 8666, 2]
2026-07-20 16:05:17 +00:00
// Module 8665 (RowButton)
import nativeDefault from "native" /* 576 */;
import ReanimatedRexport from "ReanimatedRexport" /* 4341 */;
import TableRow from "TableRow" /* 5655 */;
import Card from "Card" /* 5657 */;
import TableRowIcon from "TableRowIcon" /* 5661 */;
import BackgroundBlurView from "BackgroundBlurView" /* 8666 */;
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 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);
merged = Object.assign(global, Object.assign({ arrow: 0, disabled: 0, variant: 0, icon: 0, onPress: 0, experimental_withBlurBackground: 0 }));
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.source = icon;
obj.variant = str2;
tmp2 = jsx(closure_0(closure_2[4]).TableRowIcon, obj);
2026-07-20 16:05:17 +00:00
}
}
obj1 = { experimental_withBlurBackground, onPress: global.onPress, disabled: flag2 };
2026-07-20 16:05:17 +00:00
merged1 = Object.assign(merged);
obj4 = { icon: tmp2, arrow: flag, disabled: flag2, borderRadius: closure_1(closure_2[3]).radii.xl };
2026-07-20 16:05:17 +00:00
merged2 = Object.assign(merged);
obj1.children = jsx(closure_0(closure_2[5]).TableRowInner, obj4);
return jsx(RowButtonWrapper, obj1);
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.assign({ experimental_withBlurBackground: 0, onPress: 0, disabled: 0, children: 0 }));
const tmp2 = closure_5();
const sharedValue = ReanimatedRexport.useSharedValue(0);
2026-07-20 16:05:17 +00:00
const items = [sharedValue];
closure_2 = noop.useCallback(() => {
2026-07-20 16:05:17 +00:00
const result = sharedValue.set(1);
}, items);
const items1 = [sharedValue];
closure_3 = noop.useCallback(() => {
2026-07-20 16:05:17 +00:00
const result = sharedValue.set(0);
}, items1);
2026-08-31 15:47:37 +00:00
if (experimental_withBlurBackground.experimental_withBlurBackground) {
const obj2 = {
shadow: "none",
border: "none",
start: true,
end: true,
onPress,
onPressIn(arg0) {
const onPressIn = merged.onPressIn;
if (onPressIn != null) {
onPressIn(arg0);
}
closure_2();
},
onPressOut(arg0) {
const onPressOut = merged.onPressOut;
if (onPressOut != null) {
onPressOut(arg0);
}
closure_3();
},
style: null,
disabled: null
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);
obj2.style = items2;
obj2.disabled = disabled;
2026-07-20 16:05:17 +00:00
const merged1 = Object.assign(merged);
obj2.variant = "transparent";
const obj3 = { pressed: sharedValue, children };
obj2.children = tmp6(BackgroundBlurView.BackgroundBlurView, obj3);
let obj4 = obj2;
2026-07-20 16:05:17 +00:00
} else {
obj4 = { shadow: "low", start: true, end: true, onPress, style: tmp2.card, disabled };
2026-07-20 16:05:17 +00:00
const merged2 = Object.assign(merged);
obj4.variant = "control-secondary";
obj4.border = "control-secondary";
obj4.children = children;
2026-07-20 16:05:17 +00:00
}
return jsx(Card.InternalCard, obj4);
2026-07-20 16:05:17 +00:00
}
const jsx = fn(21).jsx;
const createStyles = fn(4605);
let closure_5 = createStyles.createStyles(() => {
const obj = { card: null, cardWithBlur: null };
const obj2 = { padding: "y", borderTopStartRadius: nativeDefault.modules.mobile.TABLE_ROW_BORDER_RADIUS, borderTopEndRadius: nativeDefault.modules.mobile.TABLE_ROW_BORDER_RADIUS, borderBottomStartRadius: nativeDefault.modules.mobile.TABLE_ROW_BORDER_RADIUS, borderBottomEndRadius: nativeDefault.modules.mobile.TABLE_ROW_BORDER_RADIUS };
obj.card = obj2;
obj.cardWithBlur = { overflow: "hidden" };
2026-07-20 16:05:17 +00:00
return obj;
});
RowButton.Icon = fn(5661).TableRowIcon;
const size = fn(2);
let result = size.fileFinishedImporting("design/components/TableRow/native/RowButton.native.tsx");
2026-07-20 16:05:17 +00:00
export const RowButtonIconProps = fn(5661).TableRowIconProps;
2026-07-20 16:05:17 +00:00
export { RowButton };