/// <reference types="react" />
import { CommentInputProps } from '../comment-editor/interface';
declare type CommonFn = {
    renderAvatar?: (record: User | null) => React.ReactNode;
    renderUser?: (record: User | null) => [string, React.ReactNode];
    renderAt?: (record: {
        id: number | string;
        name: string;
    }) => React.ReactNode;
};
export interface TokenProps {
    accessExpireAt: number;
    accessToken: string;
    refreshExpireAt: number;
    refreshToken: string;
}
export declare type CommentType = 'main' | 'minor';
export declare type Person = {
    id: number | string;
    name: string;
    other: string;
};
export declare type User = {
    id: number | string;
    name: string;
    other: any;
};
export declare type OnReplyFn = (targetId: number, values: MinorCommentContentProps) => void;
export declare type OnDeleteFn = (targetId: number, type: CommentType) => void;
export declare type OnChangeFn = (targetId: number, load: any, type: CommentType) => void;
export declare type OnLoadMoreReply = (targetId: number, commentList: MinorCommentContentProps[]) => void;
export declare type CommentProps = {
    issueId: number;
    empty?: React.ReactNode;
    hideSelection?: boolean;
    hideDelete?: boolean;
    hideLike?: boolean;
    getToken: () => Promise<TokenProps>;
    getCommentCount?: (count: number) => void;
} & CommentInputProps & CommonFn;
export interface CommentListProps extends Omit<CommentListItemProps, 'record'> {
    list: CommentContentProps[];
}
export interface CommentListItemProps extends Omit<CommentListItemMinorProps, 'commentId' | 'items' | 'total'> {
    record: CommentContentProps;
}
export interface CommentListItemMinorProps extends Omit<CommentItemDetailProps, 'type' | 'record' | 'parentReplyId' | 'className'> {
    total: number;
    items: MinorCommentContentProps[];
    onLoadMoreReply: OnLoadMoreReply;
}
export declare type CommentItemDetailProps = {
    issueId: number;
    type: CommentType;
    commentId: number;
    parentReplyId?: number;
    className?: string;
    maxLength?: number;
    hideSelection?: boolean;
    hideDelete?: boolean;
    hideLike?: boolean;
    record: CommentContentProps & MinorCommentContentProps;
    getToken: () => Promise<TokenProps>;
    onReply: OnReplyFn;
    onDelete: OnDeleteFn;
    onChangeComment: OnChangeFn;
} & CommonFn;
export interface CommentContentProps {
    id: number;
    content: string;
    commentor: Person | null;
    createTime: string | number;
    allowedDelete: boolean;
    allowedChosen: boolean;
    allowedCancelLike: boolean;
    anonymity: boolean;
    chosen: boolean;
    like: boolean;
    likeNumber: number | null;
    replyDTOPageInfo?: {
        total: number;
        page: number;
        totalPages: number;
        items: MinorCommentContentProps[];
    };
}
export interface MinorCommentContentProps {
    id: number;
    content: string;
    commentor: Person | null;
    toReplier?: Person | null;
    parentReplyId?: number;
    createTime: string | number;
    allowedDelete: boolean;
    allowedChosen: boolean;
    allowedCancelLike: boolean;
    anonymity: boolean;
    chosen: boolean;
    like: boolean;
    likeNumber: number | null;
}
export {};
