'use strict';
Object.defineProperty(exports, '__esModule', {
    value: true
});
exports.default = void 0;
var _checkIPhoneX = require('./checkIPhoneX');
function _defineProperty(e, t, o) {
    if (t in e) {
        Object.defineProperty(e, t, {
            value: o,
            enumerable: true,
            configurable: true,
            writable: true
        });
    } else {
        e[t] = o;
    }
    return e;
}
function _typeof(e) {
    return (_typeof =
        'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator
            ? function (e) {
                  return typeof e;
              }
            : function (e) {
                  return e && 'function' == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? 'symbol' : typeof e;
              })(e);
}
var defaultSafeArea = {
    top: false,
    bottom: false
};
var setSafeArea = function (e) {
    return 'boolean' == typeof e
        ? Object.assign({}, defaultSafeArea, {
              top: e,
              bottom: e
          })
        : null !== e && 'object' === _typeof(e)
        ? Object.assign({}, defaultSafeArea)
        : 'string' == typeof e
        ? Object.assign({}, defaultSafeArea, _defineProperty({}, e, true))
        : defaultSafeArea;
};
var _default = {
    props: {
        safeArea: {
            type: [Boolean, String, Object],
            optionalTypes: [Boolean, String, Object],
            value: false
        }
    },
    watch: {
        safeArea: function (e) {
            this.setData({
                safeAreaConfig: setSafeArea(e)
            });
        }
    },
    definitionFilter: function (e) {
        var t = ((0, _checkIPhoneX.getSystemInfo)() || {}).statusBarHeight;
        var o = (0, _checkIPhoneX.checkIPhoneX)();
        Object.assign((e.data = e.data || {}), {
            safeAreaConfig: defaultSafeArea,
            statusBarHeight: t,
            isIPhoneX: o
        });
    }
};
exports.default = _default;
