decord/source/modules/guild_sidebar/native/ConnectedUserLimit.tsx
2026-09-02 09:53:35 +00:00

39 lines
1.1 KiB
TypeScript

// Module ID: 15939
// Function ID: 15940
// Name: ConnectedUserLimit
// Dependencies: [19, 21, 9802, 15940, 2]
// Exports: ConnectedUserLimit
// Module 15939 (ConnectedUserLimit)
import noopAll from "noop" /* 19 */;
import useChannelVideoLimitDefault from "useChannelVideoLimit" /* 9802 */;
import _modDef15940 from "module_15940" /* 15940 */;
import { jsx } from "jsxProd" /* 21 */;
noopAll;
const result = require("set").fileFinishedImporting("modules/guild_sidebar/native/ConnectedUserLimit.tsx");
export const ConnectedUserLimit = function ConnectedUserLimit(users) {
({ channel, video } = users);
const limit = useChannelVideoLimitDefault(channel).limit;
let num = -1;
if (channel.userLimit > 0) {
num = channel.userLimit;
}
if (video) {
video = limit > 0;
}
let videoLimit = false;
let total = num;
if (video) {
let bound = limit;
if (num > 0) {
const _Math = Math;
bound = Math.min(num, limit);
}
total = bound;
videoLimit = num < 0 || limit < num;
const tmp4 = num < 0 || limit < num;
}
return jsx(_modDef15940, { users: users.userCount, total, videoLimit });
};