import type { Channel, ChannelBanner, ChannelMemberCountsByGroup, ChannelMembership, ChannelMessageCount, ChannelModeration, ChannelSearchOpts, ChannelStats } from '@mattermost/types/channels'; import type { GlobalState } from '@mattermost/types/store'; import type { Team } from '@mattermost/types/teams'; import type { UserProfile } from '@mattermost/types/users'; import type { IDMappedObjects, RelationOneToManyUnique, RelationOneToOne } from '@mattermost/types/utilities'; import { calculateUnreadCount } from 'mattermost-redux/utils/channel_utils'; export declare const getCurrentChannelId: (state: GlobalState) => string; export declare const getMyChannelMemberships: (state: GlobalState) => RelationOneToOne; export declare const getMyCurrentChannelMembership: (state: GlobalState) => ChannelMembership | undefined; export declare function getAllChannels(state: GlobalState): IDMappedObjects; export declare const getAllDmChannels: import("mattermost-redux/selectors/create_selector").OutputSelector, (res: IDMappedObjects) => Record>; export declare function getAllChannelStats(state: GlobalState): RelationOneToOne; export declare function getChannelsMemberCount(state: GlobalState): Record; export declare function getChannelsInTeam(state: GlobalState): RelationOneToManyUnique; export declare function getChannelsInPolicy(): (b: GlobalState, a: { policyId: string; }) => Channel[]; export declare const getDirectChannelsSet: (state: GlobalState) => Set; export declare function getChannelMembersInChannels(state: GlobalState): RelationOneToOne>; export declare function getChannelMember(state: GlobalState, channelId: string, userId: string): ChannelMembership | undefined; export declare function makeGetChannel(): (state: GlobalState, id: string) => Channel | undefined; export declare function getChannel(state: GlobalState, id: string): Channel | undefined; export declare function getDirectChannel(state: GlobalState, id: string): Channel | undefined; export declare function getMyChannelMembership(state: GlobalState, channelId: string): ChannelMembership | undefined; export declare function makeGetChannelsForIds(): (state: GlobalState, ids: string[]) => Channel[]; export declare const getCurrentChannel: (state: GlobalState) => Channel | undefined; export declare const getCurrentChannelNameForSearchShortcut: (state: GlobalState) => string | undefined; export declare const getChannelNameForSearchShortcut: (state: GlobalState, channelId: string) => string | undefined; export declare const getMyChannelMember: (state: GlobalState, channelId: string) => ChannelMembership | undefined; export declare const getCurrentChannelStats: (state: GlobalState) => ChannelStats | undefined; export declare function isCurrentChannelFavorite(state: GlobalState): boolean; export declare const isCurrentChannelMuted: (state: GlobalState) => boolean; export declare const isMutedChannel: (state: GlobalState, channelId: string) => boolean; export declare const isCurrentChannelArchived: (state: GlobalState) => boolean; export declare const isCurrentChannelDefault: (state: GlobalState) => boolean; export declare function isCurrentChannelReadOnly(state: GlobalState): boolean; export declare function isChannelReadOnlyById(state: GlobalState, channelId: string): boolean; export declare function isChannelReadOnly(state: GlobalState, channel?: Channel): boolean; export declare function getChannelMessageCounts(state: GlobalState): RelationOneToOne; export declare function getChannelMessageCount(state: GlobalState, channelId: string): ChannelMessageCount | undefined; export declare const countCurrentChannelUnreadMessages: (state: GlobalState) => number; export declare function makeGetChannelUnreadCount(): (state: GlobalState, channelId: string) => ReturnType; export declare function getChannelByName(state: GlobalState, channelName: string): Channel | undefined; export declare function getChannelByTeamIdAndChannelName(state: GlobalState, teamId: string, channelName: string): Channel | undefined | null; export declare const getChannelSetInCurrentTeam: (state: GlobalState) => Set; export declare const getChannelSetForAllTeams: (state: GlobalState) => string[]; export declare const getChannelsInCurrentTeam: (state: GlobalState) => Channel[]; export declare const getChannelsInAllTeams: (state: GlobalState) => Channel[]; export declare const getChannelsNameMapInTeam: (state: GlobalState, teamId: string) => Record; export declare const getChannelsNameMapInCurrentTeam: (state: GlobalState) => Record; export declare const getChannelNameToDisplayNameMap: (state: GlobalState) => Record; export declare const getAllDirectChannels: (state: GlobalState) => Channel[]; export declare const getAllDirectChannelsNameMapInCurrentTeam: (state: GlobalState) => Record; export declare const getGroupChannels: (state: GlobalState) => Channel[]; export declare const getMyChannels: (state: GlobalState) => Channel[]; export declare const getOtherChannels: (state: GlobalState, archived?: boolean | null) => Channel[]; export declare const getMembersInCurrentChannel: (state: GlobalState) => Record; /** * A scalar encoding or primitive-value representation of */ export type BasicUnreadStatus = boolean | number; export type BasicUnreadMeta = { isUnread: boolean; unreadMentionCount: number; }; export declare function basicUnreadMeta(unreadStatus: BasicUnreadStatus): BasicUnreadMeta; export declare const getUnreadStatus: (state: GlobalState) => BasicUnreadStatus; /** * Return a tuple of * - Set of team IDs that have unread messages * - Map with team IDs as keys and unread mentions counts as values */ export declare const getTeamsUnreadStatuses: (state: GlobalState) => [Set, Map, Map]; export declare const getUnreadStatusInCurrentTeam: (state: GlobalState) => BasicUnreadStatus; export declare const canManageChannelMembers: (state: GlobalState) => boolean; export declare function canManageAnyChannelMembersInCurrentTeam(state: GlobalState): boolean; export declare const getAllDirectChannelIds: (state: GlobalState) => string[]; export declare const getChannelIdsInCurrentTeam: (state: GlobalState) => string[]; export declare const getChannelIdsForCurrentTeam: (state: GlobalState) => string[]; export declare const getChannelIdsInAllTeams: (state: GlobalState) => string[]; export declare const getChannelIdsForAllTeams: (state: GlobalState) => string[]; export declare const getUnreadChannelIds: (state: GlobalState, lastUnreadChannel?: Channel | null) => string[]; export declare const getAllTeamsUnreadChannelIds: (state: GlobalState) => string[]; export declare const getUnreadChannels: (state: GlobalState, lastUnreadChannel?: Channel | null) => Channel[]; export declare const getUnsortedAllTeamsUnreadChannels: (state: GlobalState) => Channel[]; export declare const sortUnreadChannels: (channels: Channel[], myMembers: RelationOneToOne, lastUnreadChannel: (Channel & { hadMentions: boolean; }) | null, crtEnabled: boolean) => Channel[]; export declare const getSortedAllTeamsUnreadChannels: (state: GlobalState) => Channel[]; export declare const getDirectAndGroupChannels: (a: GlobalState) => Channel[]; /** * Returns an array of unsorted group channels, each with an array of the user profiles in the channel attached to them. */ export declare const getChannelsWithUserProfiles: (state: GlobalState) => Array<{ profiles: UserProfile[]; } & Channel>; export declare const getDefaultChannelForTeams: (state: GlobalState) => RelationOneToOne; export declare const getMyFirstChannelForTeams: (state: GlobalState) => RelationOneToOne; export declare const getRedirectChannelNameForCurrentTeam: (state: GlobalState) => string; export declare const getRedirectChannelNameForTeam: (state: GlobalState, teamId: string) => string; export declare function isManuallyUnread(state: GlobalState, channelId?: string): boolean; export declare function getChannelModerations(state: GlobalState, channelId: string): ChannelModeration[]; export declare function getChannelMemberCountsByGroup(state: GlobalState, channelId?: string): ChannelMemberCountsByGroup; export declare function isFavoriteChannel(state: GlobalState, channelId: string): boolean; export declare function filterChannelList(channelList: Channel[], filters: ChannelSearchOpts): Channel[]; export declare function searchChannelsInPolicy(state: GlobalState, policyId: string, term: string, filters: ChannelSearchOpts): Channel[]; export declare function getDirectTeammate(state: GlobalState, channelId: string): UserProfile | undefined; export declare function makeGetGmChannelMemberCount(): (state: GlobalState, channel: Channel) => number; export declare const getMyActiveChannelIds: import("mattermost-redux/selectors/create_selector").OutputSelector string[]>; export declare const getRecentProfilesFromDMs: (state: GlobalState) => UserProfile[]; export declare const isDeactivatedDirectChannel: (state: GlobalState, channelId: string) => boolean; export declare function getChannelBanner(state: GlobalState, channelId: string): ChannelBanner | undefined; export declare function isChannelAutotranslated(state: GlobalState, channelId: string): boolean; export declare function isMyChannelAutotranslated(state: GlobalState, channelId: string): boolean; export declare function isUserLanguageSupportedForAutotranslation(state: GlobalState): boolean; export declare function hasAutotranslationBecomeEnabled(state: GlobalState, channelOrMember: Channel | ChannelMembership): boolean | undefined;