import { toNumber } from 'lodash';
import { PixelRatio } from 'react-native';
import { getTheme, toOnlyNumbers } from '@platformbuilders/helpers';
const baseFontSize = 16;
export const getFontSize = (props) => {
    const fontSizeFromTheme = getTheme(`fontSizes.${props.variant}`)(props);
    return (PixelRatio.roundToNearestPixel(toNumber(fontSizeFromTheme)) || baseFontSize);
};
export const getLineHeight = (props) => {
    const fontSizeFromTheme = getTheme(`fontSizes.${props.variant}`)(props);
    const lineHeightVariant = getTheme(`lineHeight.${props.lineHeightVariant}`)(props);
    const lineHeightPercentage = lineHeightVariant
        ? toOnlyNumbers(lineHeightVariant)
        : '120';
    return (Number(fontSizeFromTheme) * Number(lineHeightPercentage)) / 100;
};
//# sourceMappingURL=getByTypographyVariant.js.map