"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "getTextValue", {
    enumerable: true,
    get: function() {
        return getTextValue;
    }
});
// Type Guard для multiple.
// @ts-ignore
function isMultiple(multiple, value) {
    return Boolean(multiple);
}
const getTextValue = (multiple, value, valueToItemMap, renderValue)=>{
    if (isMultiple(multiple, value) || !value) {
        return '';
    }
    return renderValue?.({
        value,
        label: ''
    }) || valueToItemMap.get(value)?.label || value.toString();
};
