decord/source/components_native/common/TouchableBackground.tsx

60 lines
2.1 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 11949
// Function ID: 11950
2026-07-20 16:05:17 +00:00
// Name: TouchableBackground
2026-08-25 06:04:03 +00:00
// Dependencies: [32, 19, 17, 21, 4380, 712, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-25 06:04:03 +00:00
// Module 11949 (TouchableBackground)
2026-08-24 06:08:38 +00:00
import ThemesDefault from "Themes" /* 712 */;
import closure_0 from "_slicedToArray" /* 32 */;
import closure_1 from "noop" /* 19 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import { jsx } 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-07-29 08:29:29 +00:00
({ View: obj1, Pressable: c3 } = get_ActivityIndicator);
createCacheKey = { default: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { backgroundColor: ThemesDefault.colors.INTERACTIVE_BACKGROUND_ACTIVE };
2026-07-29 08:29:29 +00:00
createCacheKey[0] = createCacheKey;
2026-08-24 06:08:38 +00:00
let closure_5 = createCacheKey.createStyles(createCacheKey);
const result = require("set").fileFinishedImporting("components_native/common/TouchableBackground.tsx");
2026-07-20 16:05:17 +00:00
export default function TouchableBackground(onPressOut) {
({ activeBackgroundColor, onPressIn } = onPressOut);
onPressOut = onPressOut.onPressOut;
({ pressableStyle, style, children } = onPressOut);
2026-07-29 08:29:29 +00:00
const merged = Object.assign(onPressOut, Object.create(null));
c2 = undefined;
2026-08-24 06:08:38 +00:00
const tmp2 = callback();
2026-07-29 08:29:29 +00:00
[tmp4, c2] = onPressIn(onPressOut.useState(false), 2);
2026-07-20 16:05:17 +00:00
const items = [onPressIn];
const items1 = [onPressOut];
2026-08-24 06:08:38 +00:00
callback = onPressOut.useCallback((arg0) => {
2026-07-29 08:29:29 +00:00
_undefined(true);
if (onPressIn != null) {
tmp2(arg0);
2026-07-20 16:05:17 +00:00
}
}, items);
2026-07-29 08:29:29 +00:00
let obj = { accessibilityRole: "button", style: pressableStyle };
2026-07-23 10:11:24 +00:00
const callback1 = onPressOut.useCallback((arg0) => {
2026-07-29 08:29:29 +00:00
if (onPressOut != null) {
tmp(arg0);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
_undefined(false);
2026-07-20 16:05:17 +00:00
}, items1);
const merged1 = Object.assign(merged);
2026-07-29 08:29:29 +00:00
obj.onPressIn = callback;
obj.onPressOut = callback1;
2026-07-20 16:05:17 +00:00
const items2 = [style, ];
2026-07-29 08:29:29 +00:00
if (tmp4) {
if (activeBackgroundColor == null) {
activeBackgroundColor = tmp2.default.backgroundColor;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { backgroundColor: null };
obj[0] = activeBackgroundColor;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items2[1] = tmp4;
obj.children = <c2 style={items2}>{children}</c2>;
return <closure_3 accessibilityRole="button" style={pressableStyle} />;
2026-07-20 16:05:17 +00:00
};