/**
 * Size options for the rich text image editor.
 */
export type VegaRichTextImageEditorSizeType = 'sm' | 'md' | 'lg';

/**
 * Image record used by the image editor.
 */
export type VegaRTEImageEditorRecord = {
	/**
	 * Selected image size.
	 */
	size: VegaRichTextImageEditorSizeType;
	/**
	 * Alternative text for the image.
	 */
	alt: string;
};

/**
 * Change detail payload emitted by the image editor.
 */
export type VegaRichTextImageEditorChangeDetail =
	| {
			/**
			 * Action representing an edit.
			 */
			action: 'edit';
			/**
			 * Image record payload.
			 */
			payload: VegaRTEImageEditorRecord;
	  }
	| {
			/**
			 * Action representing a delete.
			 */
			action: 'delete';
	  };
