import { Dimensions, useWindowDimensions } from 'react-native';

const { width, height } = Dimensions.get('window');

const guidelineBaseWidth = 375;
const guidelineBaseHeight = 812;

/*

Use HorizontalScale for width, marginLeft, marginRight, paddingLeft,paddingRight,
paddingHorizontal, likewise

Use VerticalScale for width, marginTop, marginBottom, marginVertical, line-height,paddingTop, paddingBottom,paddingVertical, likewise

Use ModerateScale for font-size, borderRadius , likewise

*/


const screenDimensions = Dimensions.get("window")
const screenWidth = screenDimensions.width
const screenHeight = screenDimensions.height

const horizontalScale = (size) => (width / guidelineBaseWidth) * size;
const verticalScale = (size) => (height / guidelineBaseHeight) * size;
const moderateScale = (size, factor = 0.5) => size + (horizontalScale(size) - size) * factor;

export { horizontalScale, verticalScale, moderateScale, screenHeight,screenWidth};