/* Metro module 4588; source: design/components/Button/native/ButtonShine.native.tsx; dependencies: [57, 31, 33, 4583, 674, 4002, 4017, 4504, 4501, 2] */ import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */ import Module00674 from '../../../../by-id/module-00674.js'; /* Metro dependency 674 */ 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 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 SharedModule from '../../../shared.tsx'; /* Metro dependency 4002 */ import * as ReanimatedRexportModule from '../../../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */ import * as CreateStylesModule from '../../Styles/native/createStyles.tsx'; /* Metro dependency 4501 */ import * as ButtonHooksNativeModule from './ButtonHooks.native.tsx'; /* Metro dependency 4583 */ function _fun38907(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4766:6, offset: 0x010d09b4, size: 189 bytes, params: 8, frame: 20 const env0_0 = require; const useShineEffectStyles2 = useShineEffectStyles; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); object = {code: "function ButtonShineNativeTsx1(){const{width,SHINE_OFFSCREEN_OFFSET,useReducedMotion,SHINE_WIDTH,withRepeat,withSequence,withTiming,withDelay,SHINE_INITIAL_ANIMATION_DELAY,SHINE_ANIMATION_DURATION}=this.__closure;if(width==null){return{transform:[{translateX:-SHINE_OFFSCREEN_OFFSET}]};}if(useReducedMotion){const centerOffset=(width-SHINE_WIDTH)/2;return{transform:[{translateX:centerOffset}]};}return{transform:[{translateX:withRepeat(withSequence(withTiming(-SHINE_OFFSCREEN_OFFSET,{duration:0},'animate-always'),withDelay(SHINE_INITIAL_ANIMATION_DELAY,withTiming(width+SHINE_OFFSCREEN_OFFSET,{duration:SHINE_ANIMATION_DURATION},'animate-always'))),-1)}]};}"}; (FileImportTrackerModule).fileFinishedImporting('design/components/Button/native/ButtonShine.native.tsx'); exports.useShineEffectStyles = useShineEffectStyles2; exports.ButtonShine = ButtonShine; function useShineEffectStyles(a0, a1) { // fn#38908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4766:804, offset: 0x010d0a71, size: 487 bytes, params: 3, frame: 20 const env0_0 = a0; const value5 = (Module00674)((ButtonHooksNativeModule).useButtonTextColorStyles(a1).color).alpha(0.1).hex(); const useContext = ReactModule.useContext; const AccessibilityPreferencesContext = (SharedModule).AccessibilityPreferencesContext; const enabled = Reflect.apply(useContext, ReactModule, [AccessibilityPreferencesContext]).reducedMotion.enabled; const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle; const useShineEffectStylesO2 = useShineEffectStylesO; let object = {width: a0, SHINE_OFFSCREEN_OFFSET: 120, useReducedMotion: enabled, SHINE_WIDTH: 56}; object.withRepeat = ReanimatedRexportModule.withRepeat; object.withSequence = ReanimatedRexportModule.withSequence; object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming; object.withDelay = ReanimatedRexportModule.withDelay; object.SHINE_INITIAL_ANIMATION_DELAY = 750; object.SHINE_ANIMATION_DURATION = 2000; useShineEffectStylesO2.__closure = object; useShineEffectStylesO2.__workletHash = 15814138938406; useShineEffectStylesO2.__initData = env0_6; const value = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [useShineEffectStylesO2]); object = {}; object.shineStyles = CreateStylesModule.createStyles({shineContainer: {'width': '100%', 'height': '200%', 'position': 'absolute', 'overflow': 'hidden'}, shine: {'width': 56, 'height': '500%', 'transform': null, 'backgroundColor': null, 'top': '-100%', 'alignItems': 'center', transform: [{rotate: '30deg'}], backgroundColor: value5}, shineInner: {'width': 16, 'height': '100%', backgroundColor: value5}})(); object.shineAnimatedStyle = value; return object; function useShineEffectStylesO() { // fn#38909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4766:1027, owner: useShineEffectStyles.o, offset: 0x010d0c58, size: 303 bytes, params: 1, frame: 27 var r0; var enabledBinding; var object; var object2; var value2; var moduleValue; var withRepeat; var moduleValue2; var withSequence; var withTiming; var value3; var moduleValue4; var withDelay; var moduleValue5; var value; if (env0_0 == null) { r0 = {transform: [{translateX: -120}]}; } else { enabledBinding = enabled; object = {}; object2 = {}; if (enabledBinding) { object2.translateX = (env0_0 - 56) / 2; object.transform = [object2]; r0 = object; } 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(-120, {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_0 + 120; value = Reflect.apply(withTiming, moduleValue5, [value, {duration: 2000}, 'animate-always']); value = Reflect.apply(withSequence, moduleValue2, [value3, Reflect.apply(withDelay, moduleValue4, [750, value])]); object2.translateX = Reflect.apply(withRepeat, moduleValue, [value, -1]); object.transform = [object2]; r0 = object; } } return r0; } } function ButtonShine({variant}) { // fn#38910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4766:2109, offset: 0x010d0d87, size: 226 bytes, params: 2, frame: 20 const [property, env0_0] = Module00057(ReactModule.useState(null), 2); const {shineStyles, shineAnimatedStyle} = useShineEffectStyles(property, variant); const View = (ReanimatedRexport).View; const viewProps = {onLayout: onLayout_38911, style: [shineStyles.shineContainer, shineAnimatedStyle]}; const View2 = (ReanimatedRexport).View; const shine = shineStyles.shine; const View3 = (ReanimatedRexport).View; return ( ); function ButtonShineOnLayout({nativeEvent}) { // fn#38911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4766:2288, owner: ButtonShine.onLayout, offset: 0x010d0e69, size: 36 bytes, params: 2, frame: 11 return env0_0(nativeEvent.layout.width); } } } global.__d(_fun38907, 4588, [57, 31, 33, 4583, 674, 4002, 4017, 4504, 4501, 2]) /* metro module 4588, dependencies: [57, 31, 33, 4583, 674, 4002, 4017, 4504, 4501, 2] */;