"use strict";

require("core-js/modules/es.object.define-property.js");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.useInnerVisible = useInnerVisible;
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
var _react = require("react");
var _index = require("../hooks/index");
function useInnerVisible(outerVisible) {
  var _useState = (0, _react.useState)(outerVisible),
    _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
    innerVisible = _useState2[0],
    setInnerVisible = _useState2[1];
  (0, _index.useIsomorphicLayoutEffect)(function () {
    setInnerVisible(outerVisible);
  }, [outerVisible]);
  return innerVisible;
}