130 lines
6.9 KiB
TypeScript
130 lines
6.9 KiB
TypeScript
/* Metro module 5278; source: design/void/Pressables/native/Pressables.tsx; dependencies: [31, 27, 4586, 1309, 33, 4501, 697, 477, 5279, 2] */
|
|
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
|
|
import * as FormConstantsModule from '../../Form/native/FormConstants.tsx'; /* Metro dependency 1309 */
|
|
import * as CreateStylesModule from '../../../components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
import * as StyleConstantsModule from '../../../components/Styles/native/styleConstants.tsx'; /* Metro dependency 4586 */
|
|
|
|
function _fun46911(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5456:6, offset: 0x011b29f6, size: 310 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactModule;
|
|
const createStyles = CreateStylesModule.createStyles;
|
|
const BACKGROUND_MOD_MUTED = (Native).colors.BACKGROUND_MOD_MUTED;
|
|
const env0_8 = Reflect.apply(createStyles, CreateStylesModule,
|
|
[{pressedHighlight: {backgroundColor: BACKGROUND_MOD_MUTED}}]);
|
|
const value3 = value.forwardRef(_fun46916);
|
|
value = value.forwardRef(_fun46917);
|
|
(FileImportTrackerModule).fileFinishedImporting('design/void/Pressables/native/Pressables.tsx');
|
|
exports.PressableOpacity = value3;
|
|
exports.PressableHighlight = value;
|
|
function PressableBase(a0) { // fn#46912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5456:297, offset: 0x011b2b2c, size: 253 bytes, params: 2, frame: 25
|
|
const children = a0.children;
|
|
const androidRippleConfig = a0.androidRippleConfig;
|
|
const style = a0.style;
|
|
const type = a0.type;
|
|
const activeOpacity = a0.activeOpacity;
|
|
const activeOpacity2 = activeOpacity;
|
|
const underlayColor = a0.underlayColor;
|
|
const innerRef = a0.innerRef;
|
|
const object = {'children': 0, 'androidRippleConfig': 0, 'style': 0, 'type': 0, 'activeOpacity': 0,
|
|
'underlayColor': 0, 'innerRef': 0};
|
|
silentSetPrototypeOf(object, null, undefined);
|
|
const value = copyDataProperties({}, a0, object, type);
|
|
const styles = useStyles();
|
|
return (
|
|
<Pressable
|
|
android_ripple={activeOpacity2.useMemo(_fun46915, [androidRippleConfig, style])}
|
|
style={activeOpacity2.useMemo(_fun46913, [type, activeOpacity, underlayColor, style,
|
|
styles.pressedHighlight.backgroundColor])}
|
|
ref={innerRef}
|
|
{...value}
|
|
>
|
|
{children}
|
|
</Pressable>
|
|
);
|
|
function _fun46913() { // fn#46913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5456:475, offset: 0x011b2c29, size: 56 bytes, params: 1, frame: 11
|
|
var environment;
|
|
let value = environment.__proto__;
|
|
value = require(477) /* metro dependency 477: PlatformUtils */;
|
|
return value.isAndroid() ? style : function({pressed}) {
|
|
var value2 = null;
|
|
return [style,
|
|
pressed ? type === 'highlight' ? {backgroundColor: value2 != underlayColor ? underlayColor : backgroundColor} : {opacity: value2 != activeOpacity ? activeOpacity : 0.2} : value2,
|
|
|
|
IOS_POINTER_STYLE];
|
|
};
|
|
}
|
|
|
|
function _fun46915() { // fn#46915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5456:625, offset: 0x011b2cdc, size: 157 bytes, params: 1, frame: 19
|
|
var r9;
|
|
var r4;
|
|
var object;
|
|
var cornerRadius;
|
|
var defaultImport;
|
|
var value3;
|
|
var getThemedRippleConfigBinding;
|
|
if (PlatformUtilsModule.isAndroid()) {
|
|
cornerRadius = (androidRippleConfig ?? ({})).cornerRadius;
|
|
if (cornerRadius != null) {
|
|
r4 = cornerRadius;
|
|
} else {
|
|
defaultImport = importDefault(5279) /* metro dependency 5279: StyleSheetUtils */;
|
|
value3 = defaultImport.getStyleProp(style, 'borderRadius');
|
|
if (value3 == null) {
|
|
r4 = cornerRadius;
|
|
r9 = defaultImport;
|
|
} else {
|
|
r4 = value3;
|
|
r9 = defaultImport;
|
|
}
|
|
}
|
|
getThemedRippleConfigBinding = getThemedRippleConfig;
|
|
object = {};
|
|
copyDataProperties(object, androidRippleConfig, r9);
|
|
object['cornerRadius'] = r4;
|
|
return getThemedRippleConfigBinding(object);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function _fun46916(a0, a1) { // fn#46916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5456:883, offset: 0x011b2d79, size: 98 bytes, params: 3, frame: 17
|
|
let activeOpacity = a0.activeOpacity;
|
|
activeOpacity = activeOpacity === undefined ? 0.2 : activeOpacity;
|
|
const value = Object.create(null);
|
|
value.activeOpacity = 0;
|
|
return (
|
|
<PressableBase
|
|
innerRef={a1}
|
|
type="opacity"
|
|
activeOpacity={activeOpacity}
|
|
{...copyDataProperties({}, a0, value, undefined)}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function _fun46917(a0, a1) { // fn#46917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5456:1013, offset: 0x011b2ddb, size: 84 bytes, params: 3, frame: 16
|
|
const underlayColor = a0.underlayColor;
|
|
const value = Object.create(null);
|
|
value.underlayColor = 0;
|
|
return (
|
|
<PressableBase
|
|
innerRef={a1}
|
|
type="highlight"
|
|
underlayColor={underlayColor}
|
|
{...copyDataProperties({}, a0, value, undefined)}
|
|
/>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun46911, 5278, [31, 27, 4586, 1309, 33, 4501, 697, 477, 5279,
|
|
2]) /* metro module 5278, dependencies: [31, 27, 4586, 1309, 33, 4501, 697, 477, 5279, 2] */;
|