import { defineComponent, createVNode } from 'vue';

var PresetPanel = /* @__PURE__ */ defineComponent({
  name: "PresetPanel",
  props: {
    prefixCls: String,
    presets: {
      type: Array,
      default: () => []
    },
    onClick: Function,
    onHover: Function
  },
  setup(props) {
    return () => {
      if (!props.presets.length)
        return null;
      return createVNode("div", {
        "class": `${props.prefixCls}-presets`
      }, [createVNode("ul", null, [props.presets.map(({
        label,
        value
      }, index) => {
        return 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]);
      })])]);
    };
  }
});

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