77 lines
4.5 KiB
React
77 lines
4.5 KiB
React
/* Metro module 5418; source: unknown; dependencies: [57, 29, 31, 27, 33, 1485] */
|
|
import ObjectWithoutProperties from './module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
|
|
import Module00057 from './module-00057.js'; /* Metro dependency 57 */
|
|
import * as ReactNativeModule from './module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from './module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as Module01485Module from './module-01485.js'; /* Metro dependency 1485 */
|
|
|
|
function _fun47732(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#47732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5596:6, offset: 0x011cb0ee, size: 230 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const env0_2 = ['onPressIn', 'onPressOut', 'android_ripple', 'pressColor', 'pressOpacity', 'style'];
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const Animated = ReactNativeModule.Animated;
|
|
const Platform = ReactNativeModule.Platform;
|
|
const Pressable = ReactNativeModule.Pressable;
|
|
const env0_9 = Animated.createAnimatedComponent(Pressable);
|
|
const Version = Platform.Version;
|
|
const result = Version >= 21;
|
|
exports.default = PlatformPressable_47733;
|
|
function PlatformPressable_47733(a0) { // fn#47733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5596:347, offset: 0x011cb1d4, size: 323 bytes, params: 2, frame: 28
|
|
const env0_0 = a0.onPressIn;
|
|
const env0_1 = a0.onPressOut;
|
|
const android_ripple = a0.android_ripple;
|
|
const pressColor = a0.pressColor;
|
|
const pressOpacity = a0.pressOpacity;
|
|
const value = 0.3;
|
|
const value2 = undefined;
|
|
const env0_2 = value2 === pressOpacity ? value : pressOpacity;
|
|
const style = a0.style;
|
|
let binding = ObjectWithoutProperties;
|
|
const value3 = binding(a0, env0_2);
|
|
const useTheme = Module01485Module.useTheme;
|
|
const dark = Reflect.apply(useTheme, Module01485Module, []).dark;
|
|
const value4 = ReactModule.useState(_fun47734);
|
|
const value5 = 1;
|
|
const property = Module00057(value4, value5)[0];
|
|
binding = env0_9;
|
|
const Object = global.Object;
|
|
return ((Component) => <Component {...Object.assign({onPressIn: onPressIn_47736, onPressOut: function(a0) {
|
|
PlatformPressable_47733AnimateTo(1, 200);
|
|
if (onPressOut != null) {
|
|
onPressOut(a0);
|
|
}
|
|
},
|
|
android_ripple: result ? global.Object.assign({color: value2 !== pressColor ? pressColor : dark ? 'rgba(255, 255, 255, .32)' : 'rgba(0, 0, 0, .32)'},
|
|
android_ripple) : value2, style: [{opacity: result ? value5 : property}, style]}, value3)} />)(binding);
|
|
function _fun47734() { // fn#47734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5596:538, offset: 0x011cb317, size: 38 bytes, params: 1, frame: 11
|
|
let value = environment.__proto__;
|
|
const Value = Animated.Value;
|
|
value = Object.create(Value.prototype, {constructor: {value: Value}});
|
|
const value2 = new Value(1);
|
|
return value2 instanceof Object ? value2 : value;
|
|
}
|
|
|
|
function PlatformPressable_47733AnimateTo(a0, a1) { // fn#47735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5596:588, owner: PlatformPressable_47733.animateTo, offset: 0x011cb33d, size: 96 bytes, params: 3, frame: 16
|
|
const value = environment.__proto__;
|
|
if (!result) {
|
|
Animated.timing(Module00057, {toValue: a0, duration: a1, easing: Easing.inOut(Easing.quad),
|
|
useNativeDriver: true}).start();
|
|
}
|
|
}
|
|
|
|
function PlatformPressable_47733OnPressIn(a0) { // fn#47736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5596:737, owner: PlatformPressable_47733.onPressIn, offset: 0x011cb39d, size: 45 bytes, params: 2, frame: 14
|
|
PlatformPressable_47733AnimateTo(env0_2, 0);
|
|
if (onPressIn != null) {
|
|
onPressIn(a0);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun47732, 5418, [57, 29, 31, 27, 33,
|
|
1485]) /* metro module 5418, dependencies: [57, 29, 31, 27, 33, 1485] */;
|