import { __assign } from "tslib";
import { jsx as _jsx } from "react/jsx-runtime";
import { CSSTransition } from 'react-transition-group';
import { TransitionTimeOut } from '../constants';
var DrawerBackdrop = function (_a) {
    var mask = _a.mask, maskClosable = _a.maskClosable, visible = _a.visible, onClose = _a.onClose;
    var onMaskClick = function () {
        if (mask && maskClosable) {
            onClose();
        }
    };
    return (_jsx(CSSTransition, __assign({ appear: true, mountOnEnter: true, unmountOnExit: true, in: visible && mask, timeout: TransitionTimeOut, classNames: "zent-drawer-transition__backdrop" }, { children: _jsx("div", { className: "zent-drawer-backdrop", onClick: onMaskClick, "data-zv": 'v10.0.11' }, void 0) }), void 0));
};
export default DrawerBackdrop;
