import IndexError from "./IndexError.js";
/**
 * Error thrown when a message is empty or contains only whitespace.
 *
 * This error indicates that an operation received an empty message
 * where content was required.
 */
export default class EmptyMessageError extends IndexError {
    operation;
    constructor(message, options = {}) {
        const context = {
            ...options.context,
            operation: options.operation,
        };
        super(message, {
            code: 'EMPTY_MESSAGE',
            context,
        });
        this.operation = options.operation;
    }
}
