decord/source/__polyfill/00xxx/module_415.js
github-actions e510164e6b chore: update source for alpha 346.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
2026-09-10 05:38:07 +00:00

88 lines
2.5 KiB
JavaScript

// Module ID: 415
// Function ID: 416
// Dependencies: [19, 50, 112]
// Exports: default
// Module 415
import processColorDefault from "processColor" /* 50 */;
import noop from "module_19" /* 19 */;
const require = fn;
const useMemo = fn(19).useMemo;
export default function useAndroidRippleForView(arg0, arg1) {
let obj = arg0;
closure_0 = arg1;
if (arg0 == null) {
obj = {};
}
const color = obj.color;
const borderless = obj.borderless;
const radius = obj.radius;
({ cornerRadius: closure_4, foreground } = obj);
const alpha = obj.alpha;
const items = [alpha, borderless, color, foreground, radius, arg1];
return radius(() => {
if (null == color) {
if (null == borderless) {
if (null == radius) {
return null;
}
}
}
const obj = { type: "RippleAndroid", color: processColorDefault(color), borderless: true === borderless, rippleRadius: radius, rippleCornerRadius, alpha: null };
let tmp4 = alpha;
if (alpha == null) {
tmp4 = null;
}
obj.alpha = tmp4;
if (true === foreground) {
const obj2 = { nativeForegroundAndroid: obj };
let obj3 = obj2;
} else {
obj3 = { nativeBackgroundAndroid: obj };
}
return {
viewProps: obj3,
onPressIn(nativeEvent) {
const current = ref.current;
if (null != current) {
const Commands = ref(borderless[2]).Commands;
let num = nativeEvent.nativeEvent.locationX;
if (num == null) {
num = 0;
}
let num2 = nativeEvent.nativeEvent.locationY;
if (num2 == null) {
num2 = 0;
}
Commands.hotspotUpdate(current, num, num2);
const Commands2 = ref(borderless[2]).Commands;
Commands2.setPressed(current, true);
}
},
onPressMove(nativeEvent) {
const current = ref.current;
if (null != current) {
const Commands = ref(borderless[2]).Commands;
let num = nativeEvent.nativeEvent.locationX;
if (num == null) {
num = 0;
}
let num2 = nativeEvent.nativeEvent.locationY;
if (num2 == null) {
num2 = 0;
}
Commands.hotspotUpdate(current, num, num2);
}
},
onPressOut(arg0) {
const current = ref.current;
if (null != current) {
const Commands = ref(borderless[2]).Commands;
Commands.setPressed(current, false);
}
}
};
}, items);
};