import { starRatingBarSizes, starRatingBarSizesInPx } from '../constants';
export const getRatingLabel = ({ labelValues }, starValue) => {
    return labelValues?.[starValue - 1] ?? String(starValue);
};
export const getStarSizePx = ({ readOnly, size }) => {
    let resolvedSize;
    if (readOnly) {
        resolvedSize = size ?? starRatingBarSizes.medium;
    }
    else {
        resolvedSize =
            size === starRatingBarSizes.medium
                ? starRatingBarSizes.medium
                : starRatingBarSizes.large;
    }
    return starRatingBarSizesInPx[resolvedSize];
};
//# sourceMappingURL=common.js.map