/* Metro module 12716; source: design/void/ShinyButton/native/ShinyButton.tsx; dependencies: [57, 31, 27, 4502, 33, 4501, 566, 4017, 4504, 1308, 2] */ function _fun97382(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12906:6, offset: 0x0217e576, size: 340 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 */).AppState; const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */; const env0_7 = (require(33) /* metro dependency 33 */).jsx; const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({shinyButton: {overflow: 'hidden'}, shineContainer: {'width': '100%', 'height': '100%', 'position': 'absolute', 'overflow': 'hidden'}, shine: {'width': 56, 'height': '500%', 'transform': null, 'backgroundColor': 'rgba(255,255,255,0.1)', 'top': '-100%', 'alignItems': 'center', transform: [{rotate: '30deg'}]}, shineInner: {'width': 16, 'height': '100%', 'backgroundColor': 'rgba(255,255,255,0.1)'}}); object = {code: "function ShinyButtonTsx1(){const{width,OFFSCREEN_OFFSET,withRepeat,withSequence,withTiming,withDelay,INITIAL_ANIMATION_DELAY,ANIMATION_DURATION}=this.__closure;if(width==null){return{transform:[{translateX:-OFFSCREEN_OFFSET}]};}return{transform:[{translateX:withRepeat(withSequence(withTiming(-OFFSCREEN_OFFSET,{duration:0},'animate-always'),withDelay(INITIAL_ANIMATION_DELAY,withTiming(width+OFFSCREEN_OFFSET,{duration:ANIMATION_DURATION},'animate-always'))),-1)}]};}"}; (require(2) /* metro dependency 2 */).fileFinishedImporting('design/void/ShinyButton/native/ShinyButton.tsx'); exports.default = ShinyButton_97383; } function ShinyButton_97383(a0) { // fn#97383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12906:995, offset: 0x0217e6ca, size: 618 bytes, params: 2, frame: 30 const style = a0.style; const disabled = a0.disabled; const env0_1 = a0.submitting; if (a0.shineDisabled !== undefined) { } const env0_3 = a0.shineStyle; const env0_4 = a0.shineInnerStyle; const object3 = {'style': 0, 'disabled': 0, 'submitting': 0, 'shineDisabled': 0, 'shineStyle': 0, 'shineInnerStyle': 0}; silentSetPrototypeOf(object3, null, undefined); const value = copyDataProperties({}, a0, object3, undefined); const styles = useStyles(); const binding = env0_4; let useState = binding.useState; const value3 = Reflect.apply(useState, binding, [null]); const binding2 = env0_3; const value4 = binding2(value3, 2); const property = value4[0]; const env0_7 = value4[1]; const fluxModule = require(566) /* metro dependency 566: flux */; let closure = function() { return AccessibilityStore.useReducedMotion; }; const env0_8 = fluxModule.useStateFromStores([AccessibilityStore], closure, []); useState = binding.useState; const value5 = binding2(Reflect.apply(useState, binding, [AppState.currentState === 'active']), 2); const env0_9 = value5[0]; const env0_10 = value5[1]; binding.useEffect(function() { var env0_0 = AppState.addEventListener('change', _fun97387); return _fun97388; }, []); const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */; const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle; closure = ShinyButton_97383P; const object4 = {width: property, OFFSCREEN_OFFSET: 100}; object4.withRepeat = reanimatedRexportModule.withRepeat; object4.withSequence = reanimatedRexportModule.withSequence; object4.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming; object4.withDelay = reanimatedRexportModule.withDelay; object4.INITIAL_ANIMATION_DELAY = 750; object4.ANIMATION_DURATION = 2000; closure.__closure = object4; closure.__workletHash = 5550564727650; closure.__initData = env0_9; const env0_11 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]); return ((Component) => )(importDefault(1308) /* metro dependency 1308: Button */); } function handleLayout({nativeEvent}) { // fn#97384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12906:1956, owner: ShinyButton_97383.handleLayout, offset: 0x0217e934, size: 36 bytes, params: 2, frame: 11 env0_7(nativeEvent.layout.width); } function _fun97386() { // fn#97386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12906:1296, offset: 0x0217e958, size: 45 bytes, params: 1, frame: 14 const env0_0 = AppState.addEventListener('change', _fun97387); return _fun97388; } function ShinyButton_97383P() { // fn#97389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12906:1425, owner: ShinyButton_97383.p, offset: 0x0217e9a0, size: 250 bytes, params: 1, frame: 27 var object; var value2; var moduleValue; var withRepeat; var moduleValue2; var withSequence; var withTiming; var value3; var moduleValue4; var withDelay; var moduleValue5; var value; if (env0_6 == null) { object = {transform: [{translateX: -100}]}; } else { value2 = environment.__proto__; moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */; withRepeat = moduleValue.withRepeat; moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */; withSequence = moduleValue2.withSequence; value3 = (require(4504) /* metro dependency 4504: timing */).withTiming(-100, {duration: 0}, 'animate-always'); moduleValue4 = require(4017) /* metro dependency 4017: ReanimatedRexport */; withDelay = moduleValue4.withDelay; moduleValue5 = require(4504) /* metro dependency 4504: timing */; withTiming = moduleValue5.withTiming; value = env0_6 + 100; value = Reflect.apply(withTiming, moduleValue5, [value, {duration: 2000}, 'animate-always']); value = Reflect.apply(withSequence, moduleValue2, [value3, Reflect.apply(withDelay, moduleValue4, [750, value])]); object = {transform: [{translateX: Reflect.apply(withRepeat, moduleValue, [value, -1])}]}; } return object; } function renderShine() { // fn#97390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12906:2081, owner: ShinyButton_97383.renderShine, offset: 0x0217ea9a, size: 258 bytes, params: 1, frame: 22 const disabledBinding = disabled; const value2 = null; if (disabledBinding || submitting || (env0_8 || shineDisabled)) { return value2; } else if (env0_9) { const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View; return ( {((View) => {((View) => )((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View)})((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View)} ); } else { return value2; } }