decord/beta/source/modules/vibegrations/native/VibegrationsAppChannelActions.tsx
github-actions 84d017ff78 chore: update source for beta 348.6
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5021.js (118.4 MB)
2026-09-28 16:18:32 +00:00

95 lines
3.4 KiB
TypeScript

// Module ID: 12826
// Function ID: 12827
// Name: VibegrationsAppChannelActions
// Dependencies: [19, 17, 12827, 21, 4836, 504, 12828, 12829, 1115, 3715, 12830, 9640, 12450, 5370, 5374, 5385, 12831, 2]
// Exports: default
// Module 12826 (VibegrationsAppChannelActions)
import VibegrationsUtils from "VibegrationsUtils" /* 5370 */;
import restartVibegrationsAppFramesDefault from "restartVibegrationsAppFrames" /* 12450 */;
import VibegrationsAppChannelActionCreators from "VibegrationsAppChannelActionCreators" /* 12831 */;
import noop from "module_19" /* 19 */;
import VibegrationsAppChannelsStore from "VibegrationsAppChannelsStore" /* 12827 */;
require = fn;
const View = fn(17).View;
const jsxProd = fn(21);
({ jsx: hasOwnProperty, jsxs: metroRequire } = jsxProd);
const createStyles = fn(4836);
let closure_7 = createStyles.createStyles({ actionWrapper: { flexShrink: 0, flexDirection: "row", alignItems: "center" } });
const size = fn(2);
const result = size.fileFinishedImporting("modules/vibegrations/native/VibegrationsAppChannelActions.tsx");
export default function VibegrationsAppChannelActions(channel) {
channel = channel.channel;
let tmp = closure_7();
const items = [VibegrationsAppChannelsStore];
const items1 = [channel.id];
const stateFromStores = channel(504).useStateFromStores(items, () => VibegrationsAppChannelsStore.isChatOpen(channel.id), items1);
const obj = channel(504);
({ mentionCount, badge } = stateFromStores(12828)(channel.id));
stateFromStores(12829)(channel, stateFromStores);
let tmp8 = null;
if (!stateFromStores) {
tmp8 = badge;
}
const intl = tmp2(1115).intl;
const tmp5Result = stateFromStores(3715);
const items2 = [intl.string(stateFromStores ? tmp5Result.jLMpUv : tmp5Result.aWVf4j)];
if ("mention" === tmp8) {
const intl2 = tmp2(1115).intl;
const obj2 = { mentionCount };
items2.push(intl2.formatToPlainString(tmp2(1115).t["3l1GOx"], obj2));
} else if ("unread" === tmp8) {
const intl4 = tmp2(1115).intl;
items2.push(intl4.string(tmp2(1115).t.x5zAGZ));
}
const obj3 = { style: tmp.actionWrapper, children: null };
let tmp14 = null;
if (!stateFromStores) {
const obj4 = {
source: null,
IconComponent: tmp2(9640).RetryIcon,
onPress() {
const tmp = restartVibegrationsAppFramesDefault;
return tmp(VibegrationsUtils.vibegrationsAppIdFromTopic(channel.topic));
},
accessibilityLabel: null
};
const intl3 = tmp2(1115).intl;
obj4.accessibilityLabel = intl3.string(tmp5(3715).xKexN1);
tmp14 = closure_5(tmp5(12830), obj4);
const tmp5Result3 = tmp5(12830);
}
const items3 = [tmp14, ];
const tmp12 = closure_6;
const tmp13 = View;
const tmp17 = closure_5;
const tmp6 = stateFromStores(12828)(channel.id);
if (stateFromStores) {
let ChatIcon = tmp2(5374).AppsIcon;
} else {
ChatIcon = tmp2(5385).ChatIcon;
}
const obj5 = {
noMargin: true,
source: null,
IconComponent: ChatIcon,
onPress() {
return VibegrationsAppChannelActionCreators.setAppChannelChatOpen(channel.id, !stateFromStores);
},
accessibilityLabel: items2.join(", "),
badge: null != tmp8,
badgePosition: "right",
buttonText: null
};
let StringResult;
if ("mention" === tmp8) {
const _String = String;
StringResult = String(mentionCount);
}
obj5.buttonText = StringResult;
items3[1] = tmp17(stateFromStores(12830), obj5);
obj3.children = items3;
return tmp12(tmp13, obj3);
};