decord/source/components_native/common/TouchableBackground.tsx

68 lines
2.1 KiB
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 11554
// Function ID: 11555
2026-07-20 16:05:17 +00:00
// Name: TouchableBackground
2026-08-15 05:55:55 +00:00
// Dependencies: [32, 19, 17, 21, 4661, 712, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-15 05:55:55 +00:00
// Module 11554 (TouchableBackground)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray";
2026-07-29 08:29:29 +00:00
import noop from "noop";
2026-07-23 10:11:24 +00:00
import get_ActivityIndicator from "get ActivityIndicator";
import { jsx } from "jsxProd";
2026-07-29 08:29:29 +00:00
import createCacheKey from "createCacheKey";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let c3;
let obj1;
({ View: obj1, Pressable: c3 } = get_ActivityIndicator);
createCacheKey = { default: null };
createCacheKey = { backgroundColor: require("Themes").colors.INTERACTIVE_BACKGROUND_ACTIVE };
createCacheKey[0] = createCacheKey;
createCacheKey = createCacheKey.createStyles(createCacheKey);
2026-07-23 10:11:24 +00:00
const result = require("get ActivityIndicator").fileFinishedImporting("components_native/common/TouchableBackground.tsx");
2026-07-20 16:05:17 +00:00
export default function TouchableBackground(onPressOut) {
let activeBackgroundColor;
2026-07-29 08:29:29 +00:00
let c2;
2026-07-20 16:05:17 +00:00
let children;
let onPressIn;
let pressableStyle;
let style;
2026-07-29 08:29:29 +00:00
let tmp4;
2026-07-20 16:05:17 +00:00
({ 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;
const tmp2 = createCacheKey();
[tmp4, c2] = onPressIn(onPressOut.useState(false), 2);
2026-07-20 16:05:17 +00:00
const items = [onPressIn];
const items1 = [onPressOut];
2026-07-23 10:11:24 +00:00
const 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
};