Files
discord-decomp/sources/design/void/CarouselPagination/native/CarouselPagination.tsx
T
2026-07-27 16:20:00 +03:00

92 lines
5.7 KiB
TypeScript

/* Metro module 12811; source: design/void/CarouselPagination/native/CarouselPagination.tsx; dependencies: [31, 27, 33, 4501, 697, 4017, 4504, 12751, 12812, 2] */
function _fun97692(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13001:6, offset: 0x0218de5b, size: 330 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object3 = {'width': 8, 'height': 8, 'borderRadius': null, 'marginHorizontal': 4};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const ICON_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.ICON_STRONG;
object3.backgroundColor = ICON_STRONG;
const env0_5 = Reflect.apply(createStyles, createStylesModule, [{container: {'position': 'relative', 'top': -16,
'marginBottom': -16}, dot: object3}]);
object = {code: "function CarouselPaginationTsx1(){const{withTiming,active,STANDARD_EASING}=this.__closure;return withTiming(active?1:0,{duration:250,easing:STANDARD_EASING},'animate-always');}"};
object = {code: 'function CarouselPaginationTsx2(){const{interpolate,progress,interpolateColor,backgroundColor,brand500}=this.__closure;return{width:interpolate(progress.get(),[0,1],[8,16]),backgroundColor:interpolateColor(progress.get(),[0,1],[backgroundColor,brand500]),opacity:interpolate(progress.get(),[0,1],[0.3,1])};}'};
const env0_8 = value.memo(_fun97693);
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/void/CarouselPagination/native/CarouselPagination.tsx');
exports.default = CarouselPagination;
}
function _fun97693({active}) { // fn#97693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13001:850, offset: 0x0218dfa5, size: 366 bytes, params: 2, frame: 24
const styles = useStyles();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
let closure = function() {
var r2;
var moduleValue = require(dependencyMap[6]);
var withTiming = moduleValue.withTiming;
r2 = active ? 1 : 0;
var object = {duration: 250};
object.easing = require(dependencyMap[7]).STANDARD_EASING;
return Reflect.apply(withTiming, moduleValue, [r2, object, 'animate-always']);
};
const object2 = {};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.active = active;
const STANDARD_EASING = (require(12751) /* metro dependency 12751: Easing */).STANDARD_EASING;
object2.STANDARD_EASING = STANDARD_EASING;
closure.__closure = object2;
closure.__workletHash = 5885711729227;
closure.__initData = env0_6;
const value2 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
const BRAND_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_500;
const backgroundColor = styles.dot.backgroundColor;
const moduleValue2 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue2.useAnimatedStyle;
closure = c_97695;
closure.__closure = {interpolate: reanimatedRexportModule.interpolate, progress: value2,
interpolateColor: reanimatedRexportModule.interpolateColor, backgroundColor: backgroundColor,
brand500: BRAND_500};
closure.__workletHash = 7804335337011;
closure.__initData = env0_7;
const value3 = Reflect.apply(useAnimatedStyle, moduleValue2, [closure]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return <View style={[styles.dot, value3]} />;
}
function CarouselPagination({numberOfItems, currentIndex, containerStyle}) { // fn#97696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13001:1760, offset: 0x0218e241, size: 143 bytes, params: 2, frame: 20
const styles = useStyles();
const env0_82 = ((Component) => <Component />)(env0_8);
const items2 = [styles.container, containerStyle];
const Pagination = (require(12812) /* metro dependency 12812 */).Pagination;
return (
<View style={items2}>
<Pagination
dotElement={env0_82}
inactiveDotElement={env0_82}
dotsLength={numberOfItems}
activeDotIndex={currentIndex}
/>
</View>
);
}
function c_97695() { // fn#97695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13001:1256, offset: 0x0218e177, size: 202 bytes, params: 1, frame: 22
const object2 = {};
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = value.interpolate;
const binding = env0_1;
object2.width = Reflect.apply(interpolate, value, [binding.get(), [0, 1], [8, 16]]);
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
object2.backgroundColor = value.interpolateColor(binding.get(), [0, 1], [backgroundColor, BRAND_500]);
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
object2.opacity = value.interpolate(binding.get(), [0, 1], [0.3, 1]);
return object2;
}