"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.treeOperationIconProps = exports.default = void 0;
var _vue = require("vue");
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _initDefaultProps = _interopRequireDefault(require("../_util/props-util/initDefaultProps"));
var _MoreFilled = _interopRequireDefault(require("@pf-ui/pf-icons-vue/MoreFilled"));
var _classNames3 = _interopRequireDefault(require("../_util/classNames"));
var _useConfigInject2 = _interopRequireDefault(require("../_util/hooks/useConfigInject"));
var treeOperationIconProps = function treeOperationIconProps() {
  return {
    disabled: {
      type: Boolean,
      default: undefined
    },
    visible: {
      type: Boolean,
      default: undefined
    },
    prefixCls: String
  };
};
// todo: icon改成slot
exports.treeOperationIconProps = treeOperationIconProps;
var _default = (0, _vue.defineComponent)({
  name: 'PfTreeOperationIcon',
  props: (0, _initDefaultProps.default)(treeOperationIconProps(), {
    disabled: false,
    visible: false
  }),
  setup: function setup(props) {
    var _useConfigInject = (0, _useConfigInject2.default)('tree', props),
      prefixCls = _useConfigInject.prefixCls;
    return function () {
      return (0, _vue.createVNode)(_MoreFilled.default, {
        "class": (0, _classNames3.default)("".concat(prefixCls.value, "-operation"), (0, _defineProperty2.default)({}, "".concat(prefixCls.value, "-operation-disabled"), props.disabled), (0, _defineProperty2.default)({}, "".concat(prefixCls.value, "-operation-visible"), props.visible))
      }, null);
    };
  }
});
exports.default = _default;