import React from 'react'; import { FieldValue } from '../../organisms/Form/Form.types'; /** * Utility function to check if a given value has content. * - If the value is an array, it returns true if the array has elements, otherwise false. * - If the value is not an array, it returns the value itself. * * @param {FieldValue} value - The value to check. Can be a string, number, string array, or undefined. * @returns {boolean | FieldValue} - Returns true if the value is a non-empty array, otherwise returns the value itself. */ export declare const hasValue: (value: FieldValue) => boolean | FieldValue; /** * Returns the selected value in an appropriate format. * * @param selected - The selected value, which can be a string, number, or an array of strings or numbers. * @param defaultValue - The default value to return if no selected value is provided. Default is an empty string. * @param labelMap - Optional map of values to labels for displaying custom text. * @returns The selected value if it exists, formatted as a string or number, or the default value. */ export declare const getSelectedValue: (selected: FieldValue, defaultValue?: string, labelMap?: Map) => string | React.ReactNode | undefined; /** * Utility function to handle changes to the selected value in a Select component. * @param newValue The new value to be selected or deselected. * @param Values The current selected value(s). * @param multiple Flag to indicate if multiple selections are allowed. * @returns The updated selected option(s). */ export declare const handleSelectionChange: (newValue: string | number, selectedValue: FieldValue, multiple?: boolean, defaultValue?: FieldValue, hasDefaultOption?: boolean) => FieldValue; /** * Utility function to determine if an option is selected. * @param optionValue The value of the option to check. * @param Values The currently selected value. * @returns Whether the option is selected or not. */ export declare const checkIsSelected: (optionValue?: string, selectedValue?: FieldValue) => boolean;