import { IMultilineMessage } from '../components/Toast';
export interface IFeedbackErrorItem {
    message: string;
    seriousError?: boolean;
    errCode?: number;
    [key: string]: unknown;
}
export type FeedbackErrorPayload = {
    __STATUS?: {
        errors?: IFeedbackErrorItem[];
    };
    __ERRORS?: IFeedbackErrorItem[];
    errorStack?: IFeedbackErrorItem[];
} | {
    __STATUS?: {
        errors?: IFeedbackErrorItem[];
    };
    __ERRORS?: IFeedbackErrorItem[];
} | {
    errorStack?: IFeedbackErrorItem[];
};
/**
 * Get the raw error list from a response or thrown error, following source priority:
 * 1. __STATUS.errors
 * 2. __ERRORS
 * 3. errorStack (on thrown errors)
 */
export declare function getErrorListFromPayload(payload: FeedbackErrorPayload | null | undefined): IFeedbackErrorItem[];
/**
 * When provideFeedback is true, include only errors where seriousError === true
 * When provideFeedback is false, return empty array.
 */
export declare function filterBySeriousError(errors: IFeedbackErrorItem[], provideFeedback: boolean): IFeedbackErrorItem[];
/**
 * Get the list of errors to display: apply source priority then optional filtering.
 */
export declare function getDisplayableFeedbackErrors(payload: FeedbackErrorPayload | null | undefined, provideFeedback: boolean): IFeedbackErrorItem[];
/**
 * Format error items as a single toast message with bullet points.
 */
export declare function formatErrorsAsBulletToast(errors: IFeedbackErrorItem[]): IMultilineMessage[];
