import Dexie from "dexie";
import { Avatar } from "./types";
export declare type GroupInfo = {
    id: string;
    name: string;
    uid: string;
    avatar?: Avatar;
    avatarPath?: string;
    kicked?: boolean;
    memberCount?: number;
    notice?: string;
    isNewNotice?: boolean;
};
declare type UpdateGroupInfo = Partial<GroupInfo>;
export declare const nullGroup: {
    id: string;
    name: string;
    uid: string;
    avatar: Avatar;
    avatarPath: string;
};
declare class Group {
    private db?;
    private userId?;
    private store?;
    private publishThrottle;
    static authorize: boolean;
    Event: {
        groupChange: string;
    };
    init(db: Dexie): void;
    bulkPut(groupList: GroupInfo[]): Promise<void>;
    bulkPutGroups(groups: GroupInfo[]): Promise<void>;
    checkAvatarCache(id: string, avatar: Avatar): Promise<void>;
    getGroupInfo(gid: string): Promise<GroupInfo | {
        id: string;
        name: string;
        uid: string;
        avatar: Avatar;
        avatarPath: string;
    }>;
    getGroupInfoByIds(gid: string[]): Promise<GroupInfo[]>;
    getAllGroups(): Promise<GroupInfo[]>;
    queryByKeyWords(value: string, key: keyof GroupInfo): Promise<GroupInfo[]>;
    putGroup(group: GroupInfo): void;
    updateGroupInfoById(id: string, ops: UpdateGroupInfo): Promise<void>;
    notExistGroup(group: any): boolean;
    handlePublish(groups: GroupInfo[]): void;
}
declare const self: Group;
export default self;
