"use strict";

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));

var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));

var _bem = require("@zarm-design/bem");

var React = _interopRequireWildcard(require("react"));

var _configProvider = require("../config-provider");

var SafeArea = function SafeArea(props) {
  var position = props.position,
      rest = (0, _objectWithoutProperties2.default)(props, ["position"]);

  var _React$useContext = React.useContext(_configProvider.ConfigContext),
      prefixCls = _React$useContext.prefixCls;

  var bem = (0, _bem.createBEM)('safe-area', {
    prefixCls: prefixCls
  });
  return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({}, rest, {
    className: bem('', [bem("position-".concat(position))])
  }));
};

var _default = SafeArea;
exports.default = _default;