'use strict';

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

var vue = require('vue');

var PresetPanel = /* @__PURE__ */ vue.defineComponent({
  name: "PresetPanel",
  props: {
    prefixCls: String,
    presets: {
      type: Array,
      default: () => []
    },
    onClick: Function,
    onHover: Function
  },
  setup(props) {
    return () => {
      if (!props.presets.length)
        return null;
      return vue.createVNode("div", {
        "class": `${props.prefixCls}-presets`
      }, [vue.createVNode("ul", null, [props.presets.map(({
        label,
        value
      }, index) => {
        return vue.createVNode("li", {
          "key": index,
          "onClick": () => {
            props.onClick(value);
          },
          "onMouseenter": () => {
            var _a;
            (_a = props.onHover) == null ? void 0 : _a.call(props, value);
          },
          "onMouseleave": () => {
            var _a;
            (_a = props.onHover) == null ? void 0 : _a.call(props, null);
          }
        }, [label]);
      })])]);
    };
  }
});

exports.default = PresetPanel;
//# sourceMappingURL=PresetPanel.cjs.map
