// Metro module 4640 (f4641). import ChannelStore from "../../../../../stores/ChannelStore"; import PermissionStore from "../../../../../stores/PermissionStore"; import UserStore from "../../../../../stores/UserStore"; import { DEFAULT_SOUND_GUILD_ID } from "../../../../soundboard/SoundboardConstants"; import { Permissions } from "../../../../../_bundle/Module505"; import PremiumUtils from "../../../../../utils/PremiumUtils"; export default function isSoundValid(a0, a1, a2) { const channel = ChannelStore.getChannel(a2); if (a0?.guildId === DEFAULT_SOUND_GUILD_ID) { return true; } if (a0?.guildId !== channel?.guild_id && a0?.guildId !== a1) { const canUseSoundboardEverywhere = PremiumUtils.canUseSoundboardEverywhere(UserStore.getCurrentUser()); return (channel == null || channel.guild_id == null || PermissionStore.can(Permissions.USE_EXTERNAL_SOUNDS, channel)) && canUseSoundboardEverywhere; } return true; };