15 lines
848 B
TypeScript
15 lines
848 B
TypeScript
// Metro module 10192 (f10193).
|
|
import PermissionStore from "../../stores/PermissionStore";
|
|
import { Permissions } from "../../Constants";
|
|
import { useStateFromStores } from "../../_bundle/Module589";
|
|
export function canUnlinkLobbyChannel(a0, r6 = PermissionStore) {
|
|
return a0 != null && (a0.linkedLobby != null && r6.can(Permissions.MANAGE_CHANNELS, a0) && r6.can(Permissions.VIEW_CHANNEL, a0) && r6.can(Permissions.SEND_MESSAGES, a0));
|
|
}
|
|
export function useCanUnlinkLobbyChannel(c17757_0) {
|
|
return useStateFromStores([PermissionStore], () => {
|
|
if (PermissionStore !== void 0) {
|
|
return c17757_0 != null && (c17757_0.linkedLobby != null && PermissionStore.can(Permissions.MANAGE_CHANNELS, c17757_0) && PermissionStore.can(Permissions.VIEW_CHANNEL, c17757_0) && PermissionStore.can(Permissions.SEND_MESSAGES, c17757_0));
|
|
}
|
|
});
|
|
}
|