/**
 * Status values for the rich text link editor.
 */
export type VegaRichTextLinkEditorStatus = 'editOrUnlinkSelection' | 'linkEdit';

/**
 * Link record used by the link editor.
 */
export type VegaRTELinkEditorRecord = {
	/**
	 * Link display text.
	 */
	text: string;
	/**
	 * Link URL value.
	 */
	url: string;
};

/**
 * Change detail payload emitted by the link editor.
 */
export type VegaRichTextLinkEditorChangeDetail =
	| {
			/**
			 * Action representing a link creation or update.
			 */
			action: 'link';
			/**
			 * Link record payload.
			 */
			payload: VegaRTELinkEditorRecord;
	  }
	| {
			/**
			 * Action representing unlinking.
			 */
			action: 'unlink';
	  };
