import { createVNode, Transition, withDirectives, resolveDirective } from 'vue';
import { getMotion } from '../utils/motionUtil.mjs';

function Mask(props) {
  const {
    prefixCls,
    visible,
    zIndex,
    mask,
    maskAnimation,
    maskTransitionName
  } = props;
  if (!mask)
    return null;
  let motion = {};
  if (maskTransitionName || maskAnimation) {
    motion = getMotion({
      prefixCls,
      transitionName: maskTransitionName,
      animation: maskAnimation
    });
  }
  return createVNode(Transition, {
    "appear": true,
    ...motion
  }, {
    default: () => [withDirectives(createVNode("div", {
      "style": {
        zIndex
      },
      "class": `${prefixCls}-mask`
    }, null), [[resolveDirective("if"), visible]])]
  });
}
Mask.displayName = "Mask";

export { Mask as default };
//# sourceMappingURL=Mask.mjs.map
