import type { IObject } from '../../../types';
import type { MemberProps, MemberDetailsProps } from '../../../user';
import type { ListMembers, ClickMentionFallback } from '../../../form';
import type { IEnrichedUrlData } from '../../../navigation';
import type { ICategory } from './community.category.interface';
import type { ILikesFeedQueryFns, ICreatePollVars } from '../../../discussion/feeds';
export declare enum DiscussionType {
    Communities = "communities",
    Courses = "courses"
}
export declare enum DiscussionContentType {
    Answer = "answer",
    Poll = "poll",
    Post = "post",
    Response = "response",
    Reply = "reply",
    Question = "question"
}
export type IDiscussionContentType = DiscussionContentType.Answer | DiscussionContentType.Poll | DiscussionContentType.Post | DiscussionContentType.Response | DiscussionContentType.Reply | DiscussionContentType.Question;
export interface IDiscussionContent {
    /** The type of content */
    type: IDiscussionContentType | undefined;
    /** The slugs we're dealing with - used in functions */
    slugs: {
        question?: string;
        answer?: string;
        reply?: string;
    };
    /** The ID for the content */
    slug?: string;
}
export interface IFullDiscussionContent extends IDiscussionContent {
    /** The ID for the content */
    id?: string;
    /** The content slug */
    slug: string;
    /** The title of the content post */
    title?: string | {
        [key: string]: string;
    };
    /** The body of the content post */
    body?: string;
    /** The author of the post */
    author: MemberProps;
    /** The post categories */
    categories?: ICategory[];
    createdAt: Date | string;
    /** The number of likes to display */
    likes?: number;
    /** If the current user liked the content */
    userLiked?: boolean;
    peopleWhoLiked?: MemberProps[] | false;
    /** If the content is pinned */
    pinned?: boolean;
    /** DEPRECATED: If the user is able to like the content (e.g. they can't like if they're not a member) */
    canLike?: boolean;
    /** The number of comments the post has */
    comments?: number;
    /** Extra data, to show in the content */
    data?: {
        /** Details of users mentioned in the content */
        mentions?: IMentions;
        /** Link metadata, to show an enriched url for the first link in the post */
        link?: false | IEnrichedUrlData;
    };
    /** If the content has been edited */
    isEdited?: boolean;
    /** The URL to use for reporting context, etc. */
    linkBase?: string;
}
export type IForceHide = {
    /** Whether to hide the whole action bar */
    actionBar?: boolean;
    /** Whether to hide the comments */
    comments?: boolean;
    /** Whether to hide the likes */
    likes?: boolean;
    /** Whether to hide the share link button */
    shareLink?: boolean;
    /** Whether to hide the more menu */
    moreMenu?: boolean;
};
export type DiscussionCreateContentFunction = (args1: void | object, args2?: object) => void;
export type DiscussionCreatePollFunction = (args: ITransformedPollData) => Promise<IObject>;
export type DiscussionCreateLikeFunction = (args1: object) => void;
export type DiscussionDeleteLikeFunction = (args: object) => void;
export type DiscussionListLikesFunction = ILikesFeedQueryFns['list'];
export interface IMentions {
    [key: string]: IMentionData;
}
export interface IMentionData {
    /** The time the mention was created */
    created_at: string;
    /** The time the mention was updated */
    updated_at: string;
    /** The ID, matching the key */
    id: string;
    /** The data of the user being mentioned */
    data: MemberDetailsProps;
    /** An error message, shown if the user was deleted */
    error?: string;
}
export interface IDiscussionFormFns {
    /** A function to get a filtered list of members when the user starts typing a mention */
    listMembers: ListMembers;
    /** A function to call when the user clicks the mention fallback, e.g. to show an invite modal */
    clickMentionFallback: ClickMentionFallback;
    /** Get metadata about a link, to show an enriched URL */
    getLinkPreview?: (url: string) => Promise<IEnrichedUrlData>;
}
export interface IMentionsFns {
    listMembers: ListMembers;
    clickMentionFallback: ClickMentionFallback;
}
export interface IListMemberData {
    id?: string;
    name?: string;
}
export interface IConversation {
    showForm: boolean;
    prepopulateForm?: string;
    mentionData?: IListMemberData;
}
export interface ITransformedPollDataType {
    [key: string]: string | number | boolean | {
        [key: string]: string | number | boolean;
    };
}
export interface ITransformedPollData extends ICreatePollVars {
}
export interface IDiscussionFormFunctions extends IDiscussionFormFns {
    onChange?: (args: {
        [key: string]: string | string[] | boolean;
    }) => void;
    create: DiscussionCreateContentFunction;
    createPoll?: DiscussionCreatePollFunction;
    handleSaveEdit?: // eslint-disable-next-line  @typescript-eslint/no-explicit-any
    ((args: any) => Promise<void>) | (() => void);
    handleCancel?: () => void;
    callback?: (args: void) => void;
    onMention?: (value?: IListMemberData) => void;
    props?: {
        create: {
            projectNames: ['questions-answers'];
        };
    };
}
