Files
2026-07-28 01:06:53 +03:00

105 lines
7.5 KiB
TypeScript

/* Metro module 9789; source: design/components/Modal/native/ModalFloatingAction.native.tsx; dependencies: [31, 27, 33, 4501, 4017, 3875, 1585, 4577, 4581, 4589, 674, 9790, 2] */
import Module00674 from '../../../../by-id/module-00674.js'; /* Metro dependency 674 */
import UseSafeAreaInsetsNative from '../../../../modules/safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import ReanimatedRexport from '../../../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import LinearGradient from '../../../../by-id/module-04589-LinearGradient.js'; /* Metro dependency 4589 */
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 AccessibilityPreferencesContextModule from '../../../../external/discord_common/js/packages/design/components/AccessibilityPreferencesContext/AccessibilityPreferencesContext.tsx'; /* Metro dependency 3875 */
import * as CreateStylesModule from '../../Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SpringModule from '../../../animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as SpringPresetsModule from '../../../animation/reanimated/spring/springPresets.tsx'; /* Metro dependency 4581 */
import * as ModalActionButtonNativeModule from './ModalActionButton.native.tsx'; /* Metro dependency 9790 */
function _fun76732(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9975:6, offset: 0x01de2c13, size: 272 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ReactNativeModule;
const env0_4 = value.StyleSheet;
const env0_5 = value.View;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = (CreateStylesModule).createStyles({floating: {'position': 'absolute',
'bottom': 0, 'width': '100%', 'paddingHorizontal': 16}, spacer: {height: 96}});
object = {code: 'function ModalFloatingActionNativeTsx1(){const{interpolate,sharedValue,floatingBackgroundColor,useReducedMotion}=this.__closure;return{opacity:interpolate(sharedValue.get(),[0,1],[0,1]),borderBottomColor:floatingBackgroundColor,borderBottomWidth:16,transform:[{translateY:interpolate(sharedValue.get(),[useReducedMotion?0.999999:0,1],[32,0])}]};}'};
(FileImportTrackerModule).fileFinishedImporting('design/components/Modal/native/ModalFloatingAction.native.tsx');
exports.ModalFloatingAction = ModalFloatingAction;
exports.ModalFloatingActionSpacer = ModalFloatingActionSpacer;
function ModalFloatingAction(a0) { // fn#76733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9975:762, offset: 0x01de2d23, size: 586 bytes, params: 2, frame: 29
const isVisible = a0.isVisible;
const floatingBackgroundColor = a0.floatingBackgroundColor;
const value = Object.create(null);
const value2 = 0;
value.isVisible = value2;
value.floatingBackgroundColor = value2;
const value3 = copyDataProperties({}, a0, value, undefined);
const env0_3 = undefined;
const styles = useStyles();
const value6 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(isVisible ? 1 : value2);
const binding = env0_3;
const useContext = binding.useContext;
const AccessibilityPreferencesContext = (AccessibilityPreferencesContextModule).AccessibilityPreferencesContext;
const enabled = Reflect.apply(useContext, binding, [AccessibilityPreferencesContext]).reducedMotion.enabled;
const value7 = (UseSafeAreaInsetsNative)();
binding.useEffect(_fun76734, [isVisible, value6]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const ModalFloatingActionY2 = ModalFloatingActionY;
ModalFloatingActionY2.__closure = {interpolate: reanimatedRexportModule.interpolate, sharedValue: value6,
floatingBackgroundColor: floatingBackgroundColor, useReducedMotion: enabled};
ModalFloatingActionY2.__workletHash = 1679390676673;
ModalFloatingActionY2.__initData = env0_9;
const value8 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [ModalFloatingActionY2]);
const View = (ReanimatedRexport).View;
const items2 = [value8];
items2[1] = styles.floating;
items2[2] = {paddingBottom: value7.bottom};
const r4 = isVisible ? 'auto' : 'none';
const value14 = ((Component) => <Component colors={[(Module00674)(floatingBackgroundColor).alpha(value2).hex(),
floatingBackgroundColor]} locations={[0,
0.5]} style={StyleSheet.absoluteFill} />)(LinearGradient);
const ModalActionButton = (ModalActionButtonNativeModule).ModalActionButton;
return (
<View style={items2} pointerEvents={r4}>
{value14}
<ModalActionButton {...value3} {...{['variant']: 'primary'}} />
</View>
);
function _fun76734() { // fn#76734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9975:982, offset: 0x01de2f6d, size: 100 bytes, params: 1, frame: 19
const binding = env0_2;
const set = binding.set;
const withSpring = SpringModule.withSpring;
const r5 = isVisible ? 1 : 0;
const SUBTLE_SPRING = (SpringPresetsModule).SUBTLE_SPRING;
Reflect.apply(set, binding, [Reflect.apply(withSpring, SpringModule, [r5, SUBTLE_SPRING, 'animate-always'])]);
}
function ModalFloatingActionY() { // fn#76735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9975:1105, owner: ModalFloatingAction.y, offset: 0x01de2fd1, size: 197 bytes, params: 1, frame: 21
const object = {};
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
object.opacity = value.interpolate(env0_2.get(), [0, 1], [0, 1]);
object.borderBottomColor = floatingBackgroundColor;
object.borderBottomWidth = 16;
const object2 = {};
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
object2.translateY = value.interpolate(env0_2.get(), [enabled ? 0.999999 : 0, 1], [32, 0]);
object.transform = [object2];
return object;
}
}
function ModalFloatingActionSpacer() { // fn#76736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9975:1718, offset: 0x01de3096, size: 41 bytes, params: 1, frame: 14
const styles = useStyles();
return <View style={styles.spacer} />;
}
}
global.__d(_fun76732, 9789, [31, 27, 33, 4501, 4017, 3875, 1585, 4577, 4581, 4589, 674, 9790,
2]) /* metro module 9789, dependencies: [31, 27, 33, 4501, 4017, 3875, 1585, 4577, 4581, 4589, 674, 9790, 2] */;