58 lines
3.0 KiB
TypeScript
58 lines
3.0 KiB
TypeScript
/* Metro module 11847; source: components_native/common/TouchableBackground.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 2] */
|
|
function _fun90774(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12033:6, offset: 0x020451ab, size: 238 bytes, params: 8, frame: 21
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_0 = importDefault(57) /* metro dependency 57 */;
|
|
const env0_1 = importAll(31) /* metro dependency 31 */;
|
|
let value = require(27) /* metro dependency 27 */;
|
|
const env0_2 = value.View;
|
|
const env0_3 = value.Pressable;
|
|
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
const INTERACTIVE_BACKGROUND_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_ACTIVE;
|
|
const env0_5 = Reflect.apply(createStyles, value, [{default: {backgroundColor: INTERACTIVE_BACKGROUND_ACTIVE}}]);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/TouchableBackground.tsx');
|
|
exports.default = TouchableBackground;
|
|
}
|
|
|
|
function TouchableBackground(a0) { // fn#90775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12033:355, offset: 0x02045299, size: 320 bytes, params: 2, frame: 27
|
|
const activeBackgroundColor = a0.activeBackgroundColor;
|
|
const pressableStyle = a0.pressableStyle;
|
|
const style = a0.style;
|
|
const children = a0.children;
|
|
const onPressIn = a0.onPressIn;
|
|
const env0_0 = onPressIn;
|
|
const onPressOut = a0.onPressOut;
|
|
const env0_1 = onPressOut;
|
|
const object2 = {'activeBackgroundColor': 0, 'pressableStyle': 0, 'style': 0, 'children': 0, 'onPressIn': 0,
|
|
'onPressOut': 0};
|
|
silentSetPrototypeOf(object2, null, undefined);
|
|
const value = copyDataProperties({}, a0, object2, undefined);
|
|
const styles = useStyles();
|
|
const binding = env0_1;
|
|
const [property, env0_2] = env0_0(binding.useState(false), 2);
|
|
return (
|
|
<Pressable
|
|
accessibilityRole="button"
|
|
style={pressableStyle}
|
|
{...value}
|
|
{...{['onPressIn']: binding.useCallback(_fun90776, [onPressIn])}}
|
|
{...{['onPressOut']: binding.useCallback(_fun90777, [onPressOut])}}
|
|
>
|
|
<View style={[style,
|
|
property && ({backgroundColor: activeBackgroundColor ?? styles.default.backgroundColor})]}>
|
|
{children}
|
|
</View>
|
|
</Pressable>
|
|
);
|
|
}
|
|
|
|
function _fun90777(a0) { // fn#90777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12033:592, offset: 0x020453d9, size: 42 bytes, params: 2, frame: 12
|
|
if (onPressOut != null) {
|
|
onPressOut(a0);
|
|
}
|
|
env0_2(false);
|
|
}
|
|
|