88 lines
4.8 KiB
TypeScript
88 lines
4.8 KiB
TypeScript
/* Metro module 12727; source: design/void/Collapsible/native/Collapsible.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 4017, 4577, 2] */
|
|
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});
|
|
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
|
const env0_4 = importAll(31) /* metro dependency 31 */;
|
|
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
|
let value = require(33) /* metro dependency 33 */;
|
|
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 = (importDefault(697) /* metro dependency 697: 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)};}'};
|
|
(require(2) /* metro dependency 2 */).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 reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
|
const closure = CollapsibleS;
|
|
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
|
|
totalHeight: value11, EXPAND_SPRING: env0_8};
|
|
closure.__workletHash = 1072657539267;
|
|
closure.__initData = env0_10;
|
|
const value12 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
|
const value13 = env0_4.useCallback(_fun97438, [property, property2]);
|
|
const View2 = (importDefault(4017) /* metro dependency 4017: 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
|
|
const springModule = require(4577) /* metro dependency 4577: spring */;
|
|
return {height: springModule.withSpring(env0_6, env1_8)};
|
|
}
|
|
|