import { createVNode } from 'vue';
import '../../../utils/index.mjs';
import PropTypes from '../../../utils/vue/vueTypes.mjs';

const TransBtn = (props, {
  slots
}) => {
  var _a;
  const {
    class: className,
    customizeIcon,
    customizeIconProps,
    onMousedown,
    onClick
  } = props;
  let icon;
  if (typeof customizeIcon === "function")
    icon = customizeIcon(customizeIconProps);
  else
    icon = customizeIcon;
  return createVNode("span", {
    "class": className,
    "onMousedown": (event) => {
      event.preventDefault();
      if (onMousedown)
        onMousedown(event);
    },
    "style": {
      userSelect: "none",
      WebkitUserSelect: "none"
    },
    "unselectable": "on",
    "onClick": onClick,
    "aria-hidden": true
  }, [icon !== void 0 ? icon : createVNode("span", {
    "class": className.split(/\s+/).map((cls) => `${cls}-icon`)
  }, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]);
};
TransBtn.inheritAttrs = false;
TransBtn.displayName = "TransBtn";
TransBtn.props = {
  class: String,
  customizeIcon: PropTypes.any,
  customizeIconProps: PropTypes.any,
  onMousedown: Function,
  onClick: Function
};

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