"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _reactNative = require("react-native");
var _reactNativeSizeMatters = require("react-native-size-matters");
// Grab the window object from that native screen size.
const window = _reactNative.Dimensions.get('window');

// The vertical resolution of the screen.
const screenHeight = window.height;

// The horizontal resolution of the screen.
const screenWidth = window.width;

// The average resolution of common devices, based on a ~5" mobile screen.
const baselineHeight = screenHeight == 812 ? 800 : 680;

// Check for ios X device
const X_WIDTH = 812;
const X_HEIGHT = 812;
const XSMAX_WIDTH = 896;
const XSMAX_HEIGHT = 896;
const isIPhoneX = () => _reactNative.Platform.OS === 'ios' && !_reactNative.Platform.isPad && !_reactNative.Platform.isTV ? screenWidth >= X_WIDTH || screenHeight >= X_HEIGHT || screenWidth >= XSMAX_WIDTH || screenHeight >= XSMAX_HEIGHT : false;

// Scales the item based on the screen height and baselineHeight
const scale = value => Math.round(screenHeight / baselineHeight * value);
const statusBarHeight = _reactNative.Platform.select({
  ios: isIPhoneX() ? 44 : 20,
  android: _reactNative.StatusBar.currentHeight,
  default: 0
});
var _default = exports.default = {
  screenHeight: screenWidth < screenHeight ? screenHeight : screenWidth,
  screenWidth: screenWidth < screenHeight ? screenWidth : screenHeight,
  statusBarHeight,
  isIPhoneX,
  s: _reactNativeSizeMatters.s,
  //Width
  vs: _reactNativeSizeMatters.vs,
  //Height
  ms: _reactNativeSizeMatters.ms,
  mvs: _reactNativeSizeMatters.mvs,
  //Font size
  scale
};
//# sourceMappingURL=Matrics.js.map