"use strict";

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

var _react = _interopRequireDefault(require("react"));

var _one = require("remax/one");

var _common = require("./../common");

var _classnames = _interopRequireDefault(require("classnames"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var prefixCls = (0, _common.getPrefixCls)('overlay');

var Overlay = function Overlay(props) {
  var show = props.show,
      className = props.className,
      zIndex = props.zIndex,
      children = props.children,
      style = props.style,
      onTap = props.onTap;
  var overlayZindex = zIndex || zIndex === 0 ? zIndex : 999;
  return /*#__PURE__*/_react.default.createElement(_one.View, {
    className: (0, _classnames.default)(prefixCls, className, _defineProperty({}, "".concat(prefixCls, "_active"), show)),
    style: Object.assign(Object.assign({}, style), {
      zIndex: overlayZindex
    }),
    onTap: onTap
  }, children);
};

var _default = Overlay;
exports.default = _default;