'use strict';

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

var vue = require('vue');
require('../../../utils/index.cjs');
var vueTypes = require('../../../utils/vue/vueTypes.cjs');

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 vue.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 : vue.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: vueTypes.default.any,
  customizeIconProps: vueTypes.default.any,
  onMousedown: Function,
  onClick: Function
};

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