decord/source/design/void/Status/native/Status.tsx

234 lines
8.7 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 13527
// Function ID: 13528
2026-07-29 08:29:29 +00:00
// Name: Status
2026-08-24 06:08:38 +00:00
// Dependencies: [32, 19, 17, 1298, 676, 12178, 21, 4668, 13525, 712, 13528, 13529, 13530, 13531, 13532, 13533, 13534, 13526, 13535, 4119, 4749, 13512, 2]
2026-07-20 16:05:17 +00:00
// Exports: StatusWithTyping, default
2026-08-24 06:08:38 +00:00
// Module 13527 (Status)
import noopAll from "noop" /* 19 */;
import ThemesDefault from "Themes" /* 712 */;
import getAnimatedTypingTranslateX from "getAnimatedTypingTranslateX" /* 13525 */;
import STATUS_PADDINGDefault from "STATUS_PADDING" /* 13526 */;
import closure_3 from "_slicedToArray" /* 32 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import { STATUS_PADDING } from "STATUS_PADDING" /* 1298 */;
import { StatusTypes } from "ME" /* 676 */;
import n from "n" /* 12178 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
noopAll;
2026-07-29 08:29:29 +00:00
({ Image: c4, View: c5 } = get_ActivityIndicator);
2026-08-24 06:08:38 +00:00
({ TYPING_ENTERING: closure_8, TYPING_EXITING: c9, CHANNEL_SPRING_CONFIG: c10 } = n);
2026-07-29 08:29:29 +00:00
({ jsx: unpackModuleId, jsxs: closure_12 } = jsxProd);
let closure_13 = createCacheKey.createStyles({ statusIcon: { width: "100%", height: "100%" } });
let closure_14 = createCacheKey.createStyles((items) => {
2026-08-24 06:08:38 +00:00
let obj = getAnimatedTypingTranslateX;
2026-07-29 08:29:29 +00:00
const statusTypingDimensions = obj.getStatusTypingDimensions(items);
2026-07-20 16:05:17 +00:00
({ height, dotSize } = statusTypingDimensions);
if (StatusTypes.ONLINE === arg1) {
2026-08-24 06:08:38 +00:00
let PRIMARY_400 = ThemesDefault.unsafe_rawColors.GREEN_360;
2026-07-29 08:29:29 +00:00
let tmp5 = importDefault;
} else if (tmp3.IDLE === arg1) {
2026-08-24 06:08:38 +00:00
PRIMARY_400 = ThemesDefault.unsafe_rawColors.YELLOW_300;
2026-07-29 08:29:29 +00:00
tmp5 = importDefault;
} else if (tmp3.DND === arg1) {
2026-08-24 06:08:38 +00:00
PRIMARY_400 = ThemesDefault.unsafe_rawColors.RED_400;
2026-07-29 08:29:29 +00:00
tmp5 = importDefault;
} else if (tmp3.STREAMING === arg1) {
2026-08-24 06:08:38 +00:00
PRIMARY_400 = ThemesDefault.unsafe_rawColors.PLATFORM_TWITCH;
2026-07-29 08:29:29 +00:00
tmp5 = importDefault;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
if (tmp3.INVISIBLE !== arg1) {
if (tmp3.UNKNOWN !== arg1) {
const OFFLINE = tmp3.OFFLINE;
2026-07-20 16:05:17 +00:00
}
}
2026-08-24 06:08:38 +00:00
PRIMARY_400 = ThemesDefault.unsafe_rawColors.PRIMARY_400;
2026-07-29 08:29:29 +00:00
tmp5 = importDefault;
}
obj = { ellipsis: { backgroundColor: PRIMARY_400, borderRadius: height, height, width: statusTypingDimensions.width, paddingStart: 4, paddingEnd: 2, marginRight: 0 }, ellipsisDot: null };
obj = { width: dotSize, height: dotSize, backgroundColor: tmp5(712).colors.WHITE };
obj[1] = obj;
2026-07-20 16:05:17 +00:00
return obj;
});
let closure_15 = { code: "function StatusTsx1(){const{enableAnimation,withSpring,width,CHANNEL_SPRING_CONFIG,height,onAnimationFinished,borderRadius,translateX}=this.__closure;const shouldAnimate=enableAnimation.get()?'respect-motion-settings':'animate-never';return{width:withSpring(width,CHANNEL_SPRING_CONFIG,shouldAnimate),height:withSpring(height,CHANNEL_SPRING_CONFIG,shouldAnimate,onAnimationFinished),borderRadius:withSpring(borderRadius,CHANNEL_SPRING_CONFIG,shouldAnimate),transform:[{translateX:withSpring(translateX,CHANNEL_SPRING_CONFIG,shouldAnimate)}]};}" };
let closure_16 = { code: "function StatusTsx2(){const{withSpring,statusOpacity,CHANNEL_SPRING_CONFIG}=this.__closure;return{opacity:withSpring(statusOpacity,CHANNEL_SPRING_CONFIG)};}" };
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("design/void/Status/native/Status.tsx");
2026-07-20 16:05:17 +00:00
export default function Status(isMobileOnline) {
let flag = isMobileOnline.isMobileOnline;
if (flag === undefined) {
flag = false;
}
let flag2 = isMobileOnline.isVROnline;
if (flag2 === undefined) {
flag2 = false;
}
({ status, streaming, style, size } = isMobileOnline);
if (streaming === undefined) {
streaming = false;
}
2026-07-29 08:29:29 +00:00
let obj = { style: null, children: null };
2026-08-24 06:08:38 +00:00
const items = [STATUS_PADDINGDefault(size, flag, flag2), style];
2026-07-29 08:29:29 +00:00
obj[0] = items;
obj = { style: callback2().statusIcon, source: null, resizeMode: "stretch" };
if (streaming) {
2026-08-24 06:08:38 +00:00
let tmp4Result = tmp4(13528);
2026-07-29 08:29:29 +00:00
} else if (flag2) {
2026-08-24 06:08:38 +00:00
tmp4Result = tmp4(13529);
2026-08-13 17:34:28 +00:00
} else if (flag) {
2026-08-24 06:08:38 +00:00
tmp4Result = tmp4(13530);
2026-08-13 17:34:28 +00:00
} else if (StatusTypes.IDLE === status) {
2026-08-24 06:08:38 +00:00
tmp4Result = tmp4(13531);
2026-08-13 17:34:28 +00:00
} else if (tmp7.DND === status) {
2026-08-24 06:08:38 +00:00
tmp4Result = tmp4(13532);
2026-07-29 08:29:29 +00:00
} else {
if (tmp7.OFFLINE !== status) {
if (tmp7.INVISIBLE !== status) {
const ONLINE = tmp7.ONLINE;
2026-08-24 06:08:38 +00:00
tmp4Result = tmp4(13534);
2026-07-29 08:29:29 +00:00
}
}
2026-08-24 06:08:38 +00:00
tmp4Result = tmp4(13533);
2026-07-29 08:29:29 +00:00
}
obj[1] = tmp4Result;
obj[1] = closure_11(closure_4, obj);
return closure_11(closure_5, obj);
2026-07-20 16:05:17 +00:00
};
export const StatusWithTyping = function StatusWithTyping(isMobileOnline) {
let flag = isMobileOnline.isMobileOnline;
if (flag === undefined) {
flag = false;
}
let flag2 = isMobileOnline.isVROnline;
if (flag2 === undefined) {
flag2 = false;
}
({ status, size, streaming, style } = isMobileOnline);
if (streaming === undefined) {
streaming = false;
}
({ typing, userId } = isMobileOnline);
2026-07-23 10:11:24 +00:00
let first;
2026-08-24 06:08:38 +00:00
importDefault = undefined;
2026-07-23 10:11:24 +00:00
let width;
let height;
2026-08-24 06:08:38 +00:00
closure_4 = undefined;
2026-07-23 10:11:24 +00:00
let num;
2026-07-29 08:29:29 +00:00
let num2;
2026-07-23 10:11:24 +00:00
const tmp2 = callback3(size, status);
const size2 = importDefault(width[17])(size, flag, flag2);
let obj = first(width[18]);
2026-07-29 08:29:29 +00:00
if (userId == null) {
userId = "";
}
const tmp6 = height(obj.useFlashListAnimationDisabler(userId), 2);
first = tmp6[0];
importDefault = tmp8;
2026-07-20 16:05:17 +00:00
if (typing) {
2026-07-29 08:29:29 +00:00
width = tmp2.ellipsis.width + 2 * num2;
2026-07-20 16:05:17 +00:00
} else {
width = size2.width;
}
if (typing) {
2026-07-29 08:29:29 +00:00
height = tmp2.ellipsis.height + 2 * num2;
2026-07-20 16:05:17 +00:00
} else {
height = size2.height;
}
2026-07-29 08:29:29 +00:00
const tmp11 = typing ? width / 2 : size2.borderRadius;
2026-08-24 06:08:38 +00:00
closure_4 = tmp11;
2026-07-29 08:29:29 +00:00
num = 0;
2026-07-20 16:05:17 +00:00
if (typing) {
2026-07-29 08:29:29 +00:00
let tmp5Result = tmp5(tmp4[8]);
num = tmp5Result.getAnimatedTypingTranslateX(size2.width);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp5Result = tmp5(tmp4[19]);
2026-07-20 16:05:17 +00:00
class O {
constructor() {
str = "animate-never";
2026-08-24 06:08:38 +00:00
if (closure_0.get()) {
2026-07-20 16:05:17 +00:00
str = "respect-motion-settings";
}
2026-07-29 08:29:29 +00:00
obj = { width: null, height: null, borderRadius: null, transform: null };
2026-08-24 06:08:38 +00:00
obj2 = closure_0(width[20]);
obj[0] = obj2.withSpring(width, closure_1_10, str);
obj3 = closure_0(width[20]);
obj[1] = obj3.withSpring(height, closure_1_10, str, closure_1);
obj4 = closure_0(width[20]);
obj[2] = obj4.withSpring(borderRadius, closure_1_10, str);
2026-07-29 08:29:29 +00:00
obj = { translateX: null };
2026-08-24 06:08:38 +00:00
obj6 = closure_0(width[20]);
obj[0] = obj6.withSpring(closure_5, closure_1_10, str);
2026-07-20 16:05:17 +00:00
items = [];
items[0] = obj;
2026-07-29 08:29:29 +00:00
obj[3] = items;
2026-07-20 16:05:17 +00:00
return obj;
}
}
2026-07-29 08:29:29 +00:00
obj = { enableAnimation: first, withSpring: tmp5(tmp4[20]).withSpring, width, CHANNEL_SPRING_CONFIG: closure_10, height, onAnimationFinished: tmp8, borderRadius: tmp11, translateX: num };
2026-07-20 16:05:17 +00:00
O.__closure = obj;
O.__workletHash = 2188820017597;
O.__initData = closure_15;
2026-07-29 08:29:29 +00:00
num2 = 1;
const animatedStyle = tmp5Result.useAnimatedStyle(O);
2026-07-20 16:05:17 +00:00
if (typing) {
2026-07-29 08:29:29 +00:00
num2 = 0;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const tmp = callback2();
const tmp12 = closure_10;
2026-07-20 16:05:17 +00:00
const fn = function f() {
2026-08-24 06:08:38 +00:00
const obj = { opacity: first(width[20]).withSpring(num2, closure_1_10) };
2026-07-20 16:05:17 +00:00
return obj;
};
2026-07-29 08:29:29 +00:00
obj = { withSpring: tmp5(tmp4[20]).withSpring, statusOpacity: num2, CHANNEL_SPRING_CONFIG: tmp12 };
2026-07-20 16:05:17 +00:00
fn.__closure = obj;
fn.__workletHash = 7224613224414;
fn.__initData = closure_16;
2026-07-29 08:29:29 +00:00
const animatedStyle1 = first(width[19]).useAnimatedStyle(fn);
2026-08-24 06:08:38 +00:00
obj1 = { style: items, collapsable: false, children: null };
2026-07-23 10:11:24 +00:00
items = [size2, animatedStyle, style];
2026-07-20 16:05:17 +00:00
if (typing) {
2026-07-29 08:29:29 +00:00
let obj2 = { collapsable: false, entering: null, exiting: null, style: null, children: null };
obj2[1] = closure_8;
obj2[2] = closure_9;
let obj3 = { position: "absolute", left: null, top: null };
obj3[1] = num2;
obj3[2] = num2;
2026-07-20 16:05:17 +00:00
const items1 = [obj3];
2026-07-29 08:29:29 +00:00
obj2[3] = items1;
({ ellipsis: obj10[0], ellipsisDot: obj10[1] } = tmp2);
obj2[4] = callback(tmp3(tmp4[21]), { style: null, dotStyle: null, disableScale: true });
typing = callback(tmp3(tmp4[19]).View, obj2);
let obj4 = { style: null, dotStyle: null, disableScale: true };
2026-07-20 16:05:17 +00:00
}
const items2 = [typing, ];
2026-07-29 08:29:29 +00:00
const obj5 = { style: animatedStyle1, children: null };
const obj6 = { style: tmp.statusIcon, source: null, resizeMode: "stretch" };
if (streaming) {
let tmp3Result = tmp3(tmp4[10]);
} else if (flag2) {
tmp3Result = tmp3(tmp4[11]);
} else if (flag) {
tmp3Result = tmp3(tmp4[12]);
} else if (StatusTypes.IDLE === status) {
tmp3Result = tmp3(tmp4[13]);
} else if (tmp22.DND === status) {
tmp3Result = tmp3(tmp4[14]);
} else {
if (tmp22.OFFLINE !== status) {
if (tmp22.INVISIBLE !== status) {
const ONLINE = tmp22.ONLINE;
tmp3Result = tmp3(tmp4[16]);
}
}
tmp3Result = tmp3(tmp4[15]);
}
obj6[1] = tmp3Result;
2026-08-24 06:08:38 +00:00
obj5[1] = callback(closure_4, obj6);
2026-07-23 10:11:24 +00:00
items2[1] = callback(importDefault(width[19]).View, obj5);
2026-07-29 08:29:29 +00:00
obj1[2] = items2;
2026-07-23 10:11:24 +00:00
return closure_12(importDefault(width[19]).View, obj1);
2026-07-20 16:05:17 +00:00
};