export type VegaColorStageType = 'input' | 'output';

/**
 * Format input value for display in the input field and format output value for emitting in the change event, allowing for different formatting logic if needed.
 *
 * @param {VegaColorStageType} colorStageType - Indicates the stage of color processing, either 'input' for formatting the value for display in the input field or 'output' for formatting the value before emitting it in the change event.
 * @param {string} color - The color value to be formatted.
 * @returns {string} The formatted color value.
 */
export type VegaColorFormatter = (colorStageType: VegaColorStageType, color: string) => string;

/**
 * Predefined color format options or a custom color formatter function.
 * - 'hexColorFormatter': Auto add # prefix when outputting the color value and remove it when inputting the color value.
 * - VegaColorFormatter: A custom function that formats the color value based on the specified logic for input and output stages.
 */
export type VegaColorSwatchPickerFormatOption = 'hexColorFormatter' | VegaColorFormatter;
