/**
 * ldesign v0.2.14
 * (c) 2022/11/2 16:16 built by swimly
 * @license MIT
 */

'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var VueCompositionAPI = require('@vue/composition-api');

function useHover(props) {
  const {
    disabled,
    readonly,
    onMouseenter,
    onMouseleave
  } = props;
  const isHover = VueCompositionAPI.ref(false);
  const addHover = context => {
    if (readonly || disabled) return;
    isHover.value = true;
    onMouseenter === null || onMouseenter === void 0 ? void 0 : onMouseenter(context);
  };
  const cancelHover = context => {
    if (readonly || disabled) return;
    isHover.value = false;
    onMouseleave === null || onMouseleave === void 0 ? void 0 : onMouseleave(context);
  };
  return {
    isHover,
    addHover,
    cancelHover
  };
}

exports["default"] = useHover;
//# sourceMappingURL=use-hover.js.map
