/* Metro module 15327; source: modules/launchpad/native/shared/SimpleGuildContainer.tsx; dependencies: [31, 27, 33, 4501, 9608, 14421, 697, 15326, 3860, 15328, 4017, 4577, 2] */
function _fun117214(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15524:6, offset: 0x024a8cd3, size: 392 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.Pressable;
const env0_5 = value2.View;
const value3 = require(33) /* metro dependency 33 */;
const env0_6 = value3.jsx;
const env0_7 = value3.Fragment;
const env0_8 = value3.jsxs;
const env0_9 = {'mass': 0.2, 'damping': 40, 'stiffness': 300, 'overshootClamping': true, 'restSpeedThreshold': 1};
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({badgeWrapper: {'position': 'absolute',
'right': -4, 'bottom': 0}});
const env0_11 = value.memo(_fun117215);
const env0_12 = value.memo(_fun117216);
object = {code: 'function SimpleGuildContainerTsx1(){const{targetRadius}=this.__closure;return targetRadius;}'};
object = {code: 'function SimpleGuildContainerTsx2(){const{selected}=this.__closure;return selected?1:0;}'};
object = {code: "function SimpleGuildContainerTsx3(){const{withSpring,toRadius,springConfig,GUILD_SIZE,iconBackground}=this.__closure;return{borderRadius:withSpring(toRadius.get(),springConfig),width:GUILD_SIZE,height:GUILD_SIZE,overflow:'hidden',backgroundColor:iconBackground.color};}"};
object = {code: "function SimpleGuildContainerTsx4(){const{withSpring,toRadius,springConfig,interpolate,toStrokeWidth,borderColor,GUILD_SIZE}=this.__closure;return{borderRadius:withSpring(toRadius.get()+2,springConfig),borderWidth:withSpring(interpolate(toStrokeWidth.get(),[0,1],[0,2]),springConfig),borderColor:borderColor,position:'absolute',top:-2,left:-2,width:GUILD_SIZE+4,height:GUILD_SIZE+4};}"};
object = {code: "function SimpleGuildContainerTsx5(){const{withSpring,toRadius,springConfig,interpolate,toStrokeWidth,backgroundColor,GUILD_SIZE}=this.__closure;return{borderRadius:withSpring(toRadius.get(),springConfig),borderWidth:withSpring(interpolate(toStrokeWidth.get(),[0,1],[0,3]),springConfig),borderColor:backgroundColor,position:'absolute',top:0,left:0,width:GUILD_SIZE,height:GUILD_SIZE};}"};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/shared/SimpleGuildContainer.tsx');
exports.SimpleGuildContainer = SimpleGuildContainer;
exports.SimpleGuildContainerAnimated = SimpleGuildContainerAnimated;
}
function _fun117215({badge, unread, backgroundColor}) { // fn#117215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15524:352, offset: 0x024a8e5b, size: 117 bytes, params: 2, frame: 20
var r0;
var value;
const styles = useStyles();
if (badge <= 0) {
if (unread) {
var viewBindingProps = {style: styles.badgeWrapper};
value = importDefault(9608) /* metro dependency 9608: MaskedBadge */;
value = {((Component) => )(value)};
r0 = value;
} else {
r0 = null;
}
} else {
var viewBindingProps = {style: styles.badgeWrapper};
value = importDefault(9608) /* metro dependency 9608: MaskedBadge */;
value = {((Component) => )(value)};
r0 = value;
}
return r0;
}
function _fun117216({guildId, activityIndicatorState, backgroundColor}) { // fn#117216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15524:528, offset: 0x024a8ed0, size: 183 bytes, params: 2, frame: 18
var r0;
let value = null;
if (value != (value == activityIndicatorState ? undefined : activityIndicatorState.source)) {
const GuildsBarActivityIndicatorBase = (require(14421) /* metro dependency 14421: GuildsBarActivityIndicator */).GuildsBarActivityIndicatorBase;
r0 = ;
} else if (value != guildId) {
value = importDefault(14421) /* metro dependency 14421: GuildsBarActivityIndicator */;
value = ((Component) => )(value);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function SimpleGuildContainer({guildIconRef, guildId, style, children, selected, size, borderRadius = selected ? importDefault(dependencyMap[6]).radii.lg : 24, badge, unread, backgroundColor, folder, usingCutout, activityIndicatorState, accessibilityLabel, onAccessibilityAction, onLayout}) { // fn#117217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15524:2256, offset: 0x024a8f87, size: 651 bytes, params: 2, frame: 36
size = size === undefined ? 48 : size;
const env0_3 = badge;
folder = !(folder === undefined) && folder;
usingCutout = !(usingCutout === undefined) && usingCutout;
const {iconStroke,
iconBackground} = (importDefault(15326) /* metro dependency 15326: useSimpleGuildDefaultColors */)();
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
return (
{children}
{env0_3.useMemo(_fun117219, [borderRadius, usingCutout, size, iconStroke])}
{env0_3.useMemo(_fun117218, [selected, usingCutout, activityIndicatorState?.source, badge, unread, size,
Reflect.apply(useToken, useTokenModule, [BACKGROUND_BRAND]), borderRadius, backgroundColor])}
{((Component) => )(env0_12)}
{((Component) => )(env0_11)}
);
}
function SimpleGuildContainerAnimated(a0) { // fn#117220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15524:3862, offset: 0x024a93f6, size: 1055 bytes, params: 2, frame: 42
var object2;
const guildIconRef = a0.guildIconRef;
const guildId = a0.guildId;
const style = a0.style;
const children = a0.children;
const selected = a0.selected;
a0.size;
const borderRadius = a0.borderRadius;
const badge = a0.badge;
const unread = a0.unread;
const backgroundColor = a0.backgroundColor;
a0.folder;
a0.usingCutout;
const activityIndicatorState = a0.activityIndicatorState;
const accessibilityLabel = a0.accessibilityLabel;
const onAccessibilityAction = a0.onAccessibilityAction;
const onLayout = a0.onLayout;
const onPress = a0.onPress;
const onLongPress = a0.onLongPress;
const iconBackground = (importDefault(15326) /* metro dependency 15326: useSimpleGuildDefaultColors */)().iconBackground;
const r16 = selected ? (importDefault(697) /* metro dependency 697: native */).radii.lg : borderRadius ?? 24;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useDerivedValue = reanimatedRexportModule.useDerivedValue;
let closure = SimpleGuildContainerAnimatedV;
closure.__closure = {targetRadius: r16};
closure.__workletHash = 5259600477627;
closure.__initData = env0_13;
const value3 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
const moduleValue2 = reanimatedRexportModule;
useDerivedValue = moduleValue2.useDerivedValue;
closure = SimpleGuildContainerAnimatedZ;
closure.__closure = {selected: selected};
closure.__workletHash = 12318204664732;
closure.__initData = env0_14;
const value4 = Reflect.apply(useDerivedValue, moduleValue2, [closure]);
const moduleValue3 = reanimatedRexportModule;
let useAnimatedStyle = moduleValue3.useAnimatedStyle;
closure = SimpleGuildContainerAnimatedH;
object2 = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, toRadius: value3};
const binding = env0_9;
object2.springConfig = binding;
object2.GUILD_SIZE = 48;
object2.iconBackground = iconBackground;
closure.__closure = object2;
closure.__workletHash = 11339684212259;
closure.__initData = env0_15;
const value5 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
const BRAND_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_500;
const moduleValue4 = reanimatedRexportModule;
useAnimatedStyle = moduleValue4.useAnimatedStyle;
closure = SimpleGuildContainerAnimatedJ;
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, toRadius: value3,
springConfig: binding, interpolate: reanimatedRexportModule.interpolate, toStrokeWidth: value4,
borderColor: BRAND_500, GUILD_SIZE: 48};
closure.__workletHash = 1481885125958;
closure.__initData = env0_16;
const value6 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
const moduleValue5 = reanimatedRexportModule;
useAnimatedStyle = moduleValue5.useAnimatedStyle;
closure = SimpleGuildContainerAnimatedM;
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, toRadius: value3,
springConfig: binding, interpolate: reanimatedRexportModule.interpolate, toStrokeWidth: value4,
backgroundColor: backgroundColor, GUILD_SIZE: 48};
closure.__workletHash = 11592745547551;
closure.__initData = env0_17;
const value7 = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]);
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [{children}];
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
items2[1] = ;
const View4 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
items2[2] = ;
items2[3] = ((Component) => )(env0_12);
items2[4] = ((Component) => )(env0_11);
const fragment = <>{items2}>;
return onPress != null ? {fragment} : {fragment};
}
function _fun117218() { // fn#117218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15524:2653, offset: 0x024a9212, size: 397 bytes, params: 1, frame: 24
var source;
var r6;
var r1;
var r0;
var usingCutoutBinding;
var value3;
var jsxRuntimeEnv1_7Binding;
var binding;
var sizeBinding;
var items2;
var value5;
var CutoutImage;
var value6;
const selectedBinding = selected;
const value2 = null;
if (selectedBinding) {
usingCutoutBinding = usingCutout;
value3 = environment.__proto__;
if (usingCutoutBinding) {
value5 = undefined;
CutoutImage = importDefault(15328) /* metro dependency 15328: CutoutImage */;
var defaultImportProps = {'style': null, 'cutoutTopRightSize': null, 'cutoutTopRightInsetX': 8,
'cutoutTopRightInsetY': 8, 'cutoutBottomRightSize': null, 'cutoutBottomRightInsetX': 6,
'cutoutBottomRightInsetY': 7, style: {'position': 'absolute', 'top': -2, 'left': -2}};
source = value2 == activityIndicatorState ? value5 : activityIndicatorState.source;
value6 = 0;
r6 = value2 != source ? 13 : value6;
defaultImportProps.cutoutTopRightSize = r6;
r6 = badge > value6 ? 13 : unread ? 11 : value6;
defaultImportProps.cutoutBottomRightSize = r6;
sizeBinding = size;
defaultImportProps.imageSize = sizeBinding + 4;
defaultImportProps.imageBackgroundColor = env0_9;
defaultImportProps.imageBorderRadius = env0_2 + 2;
defaultImportProps.clipInnerAmount = sizeBinding;
r1 = ;
} else {
jsxRuntimeEnv1_7Binding = jsxRuntimeEnv1_7;
binding = env0_2;
sizeBinding = size;
items2 = [];
items2[1] = ;
r1 = <>{items2}>;
}
r0 = r1;
} else {
r0 = value2;
}
return r0;
}
function _fun117219() { // fn#117219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15524:3288, offset: 0x024a939f, size: 87 bytes, params: 1, frame: 16
return usingCutout ? null : ;
}
function SimpleGuildContainerAnimatedZ() { // fn#117222, owner: SimpleGuildContainerAnimated.z, offset: 0x024a9815, size: 17 bytes, params: 1, frame: 2
return selected ? 1 : 0;
}
function SimpleGuildContainerAnimatedH() { // fn#117223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15524:4478, owner: SimpleGuildContainerAnimated.H, offset: 0x024a9826, size: 91 bytes, params: 1, frame: 16
const object2 = {'borderRadius': null, 'width': 48, 'height': 48, 'overflow': 'hidden'};
const springModule = require(4577) /* metro dependency 4577: spring */;
object2.borderRadius = springModule.withSpring(env0_4.get(), env1_9);
object2.backgroundColor = iconBackground.color;
return object2;
}
function SimpleGuildContainerAnimatedJ() { // fn#117224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15524:4807, owner: SimpleGuildContainerAnimated.j, offset: 0x024a9881, size: 179 bytes, params: 1, frame: 21
const object2 = {'borderRadius': null, 'borderWidth': null, 'borderColor': null, 'position': 'absolute', 'top': -2,
'left': -2, 'width': 52, 'height': 52};
let value = environment.__proto__;
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
let binding = env0_4;
const value4 = binding.get() + 2;
binding = env1_9;
object2.borderRadius = Reflect.apply(withSpring, springModule, [value4, binding]);
value = springModule;
withSpring = value.withSpring;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
object2.borderWidth = Reflect.apply(withSpring, value, [reanimatedRexportModule.interpolate(env0_5.get(), [0, 1],
[0, 2]), binding]);
object2.borderColor = BRAND_500;
return object2;
}
function SimpleGuildContainerAnimatedM() { // fn#117225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15524:5233, owner: SimpleGuildContainerAnimated.M, offset: 0x024a9934, size: 172 bytes, params: 1, frame: 21
const object2 = {'borderRadius': null, 'borderWidth': null, 'borderColor': null, 'position': 'absolute', 'top': 0,
'left': 0, 'width': 48, 'height': 48};
let value = environment.__proto__;
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
let binding = env0_4;
const value3 = binding.get();
binding = env1_9;
object2.borderRadius = Reflect.apply(withSpring, springModule, [value3, binding]);
value = springModule;
withSpring = value.withSpring;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
object2.borderWidth = Reflect.apply(withSpring, value, [reanimatedRexportModule.interpolate(env0_5.get(), [0, 1],
[0, 3]), binding]);
object2.borderColor = backgroundColor;
return object2;
}