import type { IEnrichedUrlData } from '../../../navigation';
import type { ICategory, IDiscussionContent, IDiscussionFormFunctions, IMentions } from '../../../discussion/shared';
interface IPollData {
    options: string[];
    multipleAnswers: boolean;
}
export interface IDiscussionFormMeta {
    /** Whether the form data is still loading */
    isLoading?: boolean;
    /** Whether the form is in a wrapper or not - used for styling */
    isInWrapper?: boolean;
    /** Whether the form is in a modal or not - used to handle portals */
    isInOverlay?: false | string;
    /** Whether the form should be autofocused. (It will always be autofocused when `isEditing`. */
    isAutoFocused?: boolean;
    /** Whether we're editing or creating */
    isEditing: false | {
        categories?: string[] | string;
        text?: string;
        poll?: IPollData;
    };
    /** Whether the form has a title field */
    hasTitleField?: false | {
        text?: string;
    };
    /** If the form can be pre-populated; this is not allowed outside communities at the moment */
    canBePrepopulated?: boolean;
    /** Whether the form is prepopulated with text (different to isEditing, as we want different buttons and text to show */
    isPrepopulated: false | {
        text?: string;
    };
    /** Whether title text should show above the form */
    showTitle?: boolean;
    /** What category options should be made available for the form */
    postCategories?: ICategory[];
    /** Whether the post type should show */
    showPostType?: boolean;
    /** Whether the community guidelines text should show beneath the form */
    showGuidelines?: boolean;
    /** Whether to show a divider before the buttons */
    showDivider?: boolean;
    /** Whether the success message should show on a successful submit */
    showSuccessMessage?: boolean;
}
export interface IDiscussionForm {
    /** A unique ID for the form */
    id?: string;
    /** The ID of the parent, used for slugs */
    parentId?: string;
    /** Information about the content being created/edited */
    content: IDiscussionContent;
    /** If the user has permission to interact with the form, e.g. if they're a member of the community */
    userHasPermissions?: boolean;
    /** Information about the form */
    meta?: IDiscussionFormMeta;
    /** The placeholder text - this defaults to the intl text */
    placeholder?: string;
    /** The maximum number of characters */
    maxLength?: number;
    /** The buttons at the bottom of the form */
    buttons?: {
        /** Text for the cancel button */
        cancel?: string;
        /** Text for the submit button */
        submit?: string;
    };
    /** Force elements on the form to show, regardless of the form state */
    forceShow?: {
        /** If the cancel button should always show */
        cancel?: boolean;
        /** If an error, created externally, should always show */
        error?: false | string;
    };
    /** The functions that are passed in to handle the functionality */
    functions: IDiscussionFormFunctions;
    /** Data to be passed into the rich text editor */
    data?: {
        /** Mentions data */
        mentions?: IMentions;
        /** Optional data about the first link inside the post */
        link?: false | IEnrichedUrlData;
    };
    /** The context for GTM */
    gtmContext?: string;
    /** The language to use for the text */
    locale?: string;
}
export interface IRTEValues {
    body?: string;
    data?: {
        link?: false | IEnrichedUrlData;
    };
}
export interface IDiscussionFormState {
    status: false | 'submitting' | 'submitted';
    title: string;
    polls: number;
}
export {};
