108 lines
6.0 KiB
TypeScript
108 lines
6.0 KiB
TypeScript
/* Metro module 8561; source: design/components/Button/native/FloatingActionButton.native.tsx; dependencies: [31, 33, 4501, 697, 4582, 1357, 4017, 4577, 8342, 2] */
|
|
function _fun67813(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8746:6, offset: 0x01c32879, size: 220 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importAll(31) /* metro dependency 31 */;
|
|
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
|
let value = require(4501) /* metro dependency 4501: createStyles */;
|
|
value = value.createStyles(_fun67814);
|
|
const env0_6 = {'mass': 0.5, 'damping': 80, 'stiffness': 320};
|
|
object = {code: "function FloatingActionButtonNativeTsx1(){const{withSpring,positionBottom,DEFAULT_POSITION_OFFSET,SPRING_CONFIG,positionRight}=this.__closure;var _positionBottom,_positionRight;return{position:'absolute',bottom:withSpring((_positionBottom=positionBottom)!==null&&_positionBottom!==void 0?_positionBottom:DEFAULT_POSITION_OFFSET,SPRING_CONFIG),right:withSpring((_positionRight=positionRight)!==null&&_positionRight!==void 0?_positionRight:DEFAULT_POSITION_OFFSET,SPRING_CONFIG)};}"};
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Button/native/FloatingActionButton.native.tsx');
|
|
exports.DEFAULT_POSITION_OFFSET = 16;
|
|
exports.useStyles = value;
|
|
exports.FloatingActionButton = FloatingActionButton;
|
|
}
|
|
|
|
function _fun67814() { // fn#67814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8746:144, offset: 0x01c32955, size: 178 bytes, params: 1, frame: 19
|
|
var object4;
|
|
const value = a0;
|
|
let r2 = value !== undefined ? value : false;
|
|
const object6 = {};
|
|
const object7 = {};
|
|
const SHADOW_HIGH = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_HIGH;
|
|
copyDataProperties(object7, SHADOW_HIGH, undefined);
|
|
object6.button = object7;
|
|
const object8 = {};
|
|
const FAB_BUTTON_SIZE = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).FAB_BUTTON_SIZE;
|
|
object8.minWidth = FAB_BUTTON_SIZE;
|
|
const FAB_BUTTON_SIZE2 = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).FAB_BUTTON_SIZE;
|
|
object8.minHeight = FAB_BUTTON_SIZE2;
|
|
object8.padding = 0;
|
|
if (r2) {
|
|
object4 = {};
|
|
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
|
r2 = object4;
|
|
} else {
|
|
r2 = {};
|
|
}
|
|
copyDataProperties(object8, r2, FAB_BUTTON_SIZE);
|
|
object6.iconButtonPill = object8;
|
|
return object6;
|
|
}
|
|
|
|
function FloatingActionButton(a0) { // fn#67815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8746:1023, offset: 0x01c32a07, size: 446 bytes, params: 2, frame: 27
|
|
var r8;
|
|
var cloneElement;
|
|
const icon = a0.icon;
|
|
const positionBottom = a0.positionBottom;
|
|
const positionRight = a0.positionRight;
|
|
const accessibilityLabel = a0.accessibilityLabel;
|
|
let object3 = {'icon': 0, 'positionBottom': 0, 'positionRight': 0, 'accessibilityLabel': 0};
|
|
silentSetPrototypeOf(object3, null, undefined);
|
|
const value = copyDataProperties({}, a0, object3, undefined);
|
|
const styles = useStyles((importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('FloatingActionButton'));
|
|
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
|
const closure = FloatingActionButtonF;
|
|
const object4 = {};
|
|
object4.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
|
object4.positionBottom = positionBottom;
|
|
object4.DEFAULT_POSITION_OFFSET = 16;
|
|
object4.SPRING_CONFIG = env0_6;
|
|
object4.positionRight = positionRight;
|
|
closure.__closure = object4;
|
|
closure.__workletHash = 10762818944671;
|
|
closure.__initData = env0_7;
|
|
const value4 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
|
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
|
const BaseIconButton = (require(8342) /* metro dependency 8342: BaseIconButtonNative */).BaseIconButton;
|
|
const baseIconButtonProps = {...value};
|
|
baseIconButtonProps['accessibilityLabel'] = accessibilityLabel;
|
|
baseIconButtonProps['size'] = 'lg';
|
|
baseIconButtonProps['variant'] = 'primary';
|
|
let binding = env0_3;
|
|
if (binding.isValidElement(icon)) {
|
|
binding = env0_3;
|
|
cloneElement = binding.cloneElement;
|
|
object3 = {};
|
|
object3.color = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
|
r8 = Reflect.apply(cloneElement, binding, [icon, object3]);
|
|
} else {
|
|
r8 = icon;
|
|
}
|
|
baseIconButtonProps['icon'] = r8;
|
|
baseIconButtonProps['style'] = styles.button;
|
|
baseIconButtonProps['pillStyle'] = styles.iconButtonPill;
|
|
return (
|
|
<View style={value4}>
|
|
<BaseIconButton {...baseIconButtonProps} />
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function FloatingActionButtonF() { // fn#67816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8746:1200, owner: FloatingActionButton.F, offset: 0x01c32bc5, size: 133 bytes, params: 1, frame: 20
|
|
const object2 = {position: 'absolute'};
|
|
const springModule = require(4577) /* metro dependency 4577: spring */;
|
|
const withSpring = springModule.withSpring;
|
|
const positionBottomBinding = positionBottom;
|
|
const value3 = 16;
|
|
object2.bottom = Reflect.apply(withSpring, springModule, [positionBottomBinding != null ? positionBottom : value3,
|
|
env1_6]);
|
|
const moduleValue2 = springModule;
|
|
object2.right = moduleValue2.withSpring(positionRight ?? value3, env1_6);
|
|
return object2;
|
|
}
|
|
|