99 lines
6.0 KiB
TypeScript
99 lines
6.0 KiB
TypeScript
/* Metro module 12727; source: design/void/Collapsible/native/Collapsible.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 4017, 4577, 2] */
|
|
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import ReanimatedRexport from '../../../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
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 ReanimatedRexportModule from '../../../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
import * as SpringModule from '../../../animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
|
|
|
|
function _fun97433(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12917:6, offset: 0x02180ecf, size: 299 bytes, params: 8, frame: 21
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = JsxRuntimeModule;
|
|
const env0_6 = value.jsx;
|
|
const env0_7 = value.jsxs;
|
|
const env0_8 = {'stiffness': 150, 'overshootClamping': true};
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
const BACKGROUND_SURFACE_HIGH = (Native).colors.BACKGROUND_SURFACE_HIGH;
|
|
const env0_9 = Reflect.apply(createStyles, value, [{collapsible: {'position': 'relative', 'overflow': 'hidden'},
|
|
collapsibleContent: {backgroundColor: BACKGROUND_SURFACE_HIGH}}]);
|
|
object = {code: 'function CollapsibleTsx1(){const{withSpring,totalHeight,EXPAND_SPRING}=this.__closure;return{height:withSpring(totalHeight,EXPAND_SPRING)};}'};
|
|
(FileImportTrackerModule).fileFinishedImporting('design/void/Collapsible/native/Collapsible.tsx');
|
|
exports.default = Collapsible;
|
|
function Collapsible({children, collapsibleContent, isExpanded, style}) { // fn#97434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12917:593, offset: 0x02180ffa, size: 573 bytes, params: 2, frame: 31
|
|
let env0_3 = undefined;
|
|
let env0_4 = undefined;
|
|
const styles = useStyles();
|
|
let binding = env0_4;
|
|
let useState = binding.useState;
|
|
const value3 = env0_3(Reflect.apply(useState, binding, [false]), 2);
|
|
const property = value3[0];
|
|
const property2 = value3[1];
|
|
const r6 = isExpanded ?? property;
|
|
binding = env0_4;
|
|
const value6 = binding.useState(0);
|
|
const binding2 = env0_3;
|
|
const value7 = binding2(value6, 2);
|
|
const property3 = value7[0];
|
|
env0_3 = value7[1];
|
|
useState = binding.useState;
|
|
const value8 = binding2(Reflect.apply(useState, binding, [0]), 2);
|
|
const property4 = value8[0];
|
|
env0_4 = property4;
|
|
const env0_5 = value8[1];
|
|
const value9 = binding.useCallback(_fun97435, [property3]);
|
|
const value10 = binding.useCallback(_fun97436, [property4]);
|
|
const value11 = property3 + (r6 ? property4 : 0);
|
|
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
|
|
const CollapsibleS2 = CollapsibleS;
|
|
CollapsibleS2.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
|
|
totalHeight: value11, EXPAND_SPRING: env0_8};
|
|
CollapsibleS2.__workletHash = 1072657539267;
|
|
CollapsibleS2.__initData = env0_10;
|
|
const value12 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [CollapsibleS2]);
|
|
const value13 = env0_4.useCallback(_fun97438, [property, property2]);
|
|
const View2 = (ReanimatedRexport).View;
|
|
return (
|
|
<View style={style}>
|
|
<View2 style={[styles.collapsible, value11 > 0 ? value12 : null]}>
|
|
<View onLayout={value9}>
|
|
{children({onPress: value13})}
|
|
</View>
|
|
<View style={styles.collapsibleContent} onLayout={value10}>
|
|
{collapsibleContent}
|
|
</View>
|
|
</View2>
|
|
</View>
|
|
);
|
|
function _fun97435(a0) { // fn#97435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12917:831, offset: 0x02181237, size: 48 bytes, params: 2, frame: 11
|
|
if (env0_2 === 0) {
|
|
env0_3(a0.nativeEvent.layout.height);
|
|
}
|
|
}
|
|
|
|
function _fun97436(a0) { // fn#97436, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12917:897, offset: 0x02181267, size: 48 bytes, params: 2, frame: 11
|
|
if (env0_4 === 0) {
|
|
env0_5(a0.nativeEvent.layout.height);
|
|
}
|
|
}
|
|
|
|
function CollapsibleS() { // fn#97437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12917:989, owner: Collapsible.S, offset: 0x02181297, size: 55 bytes, params: 1, frame: 14
|
|
return {height: SpringModule.withSpring(env0_6, env1_8)};
|
|
}
|
|
|
|
function _fun97438() { // fn#97438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12917:1178, offset: 0x011bd548, size: 23 bytes, params: 1, frame: 11
|
|
env0_1(!env0_0);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun97433, 12727, [57, 31, 27, 33, 4501, 697, 4017, 4577,
|
|
2]) /* metro module 12727, dependencies: [57, 31, 27, 33, 4501, 697, 4017, 4577, 2] */;
|