import { ref, computed, createBlock, openBlock, unref, mergeProps, createSlots, renderList, withCtx, renderSlot } from "vue";
import stdin_default from "./FloatingBubble.mjs";
/* empty css           */
import { routeProps, useRoute } from "../../../utils/use-route.mjs";
import "../../../../../../_virtual/less.mjs";
const _sfc_main = {
  __name: "FloatingBubble",
  props: {
    axis: {
      //拖拽的方向，xy 代表自由拖拽，lock 代表禁止拖拽
      type: String,
      default: "xy"
    },
    magnetic: {
      //自动磁吸的方向	'x' | 'y'
      type: String,
      default: ""
    },
    ...routeProps
  },
  setup(__props) {
    const route = useRoute();
    const props = __props;
    const dropAxis = ref(props.axis);
    const compMagnetic = computed(() => {
      if (props.axis == "xy") {
        return props.magnetic;
      } else {
        return "";
      }
    });
    return (_ctx, _cache) => {
      return openBlock(), createBlock(unref(stdin_default), mergeProps({ class: "fec-floating-bubble" }, _ctx.$attrs, {
        axis: unref(dropAxis),
        magnetic: compMagnetic.value,
        onClick: unref(route)
      }), createSlots({ _: 2 }, [
        renderList(_ctx.$slots, (item, key) => {
          return {
            name: key,
            fn: withCtx(() => [
              renderSlot(_ctx.$slots, key)
            ])
          };
        })
      ]), 1040, ["axis", "magnetic", "onClick"]);
    };
  }
};
export {
  _sfc_main as default
};
