import * as _vue from "vue";

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

import { inject } from 'vue';
import PropTypes from '../_util/vue-types';
import { getSlot } from '../_util/props-util';
import { ConfigConsumerProps } from '../config-provider';
export default {
  name: 'AInputGroup',
  props: {
    prefixCls: PropTypes.string,
    size: {
      validator: function validator(value) {
        return ['small', 'large', 'default'].includes(value);
      }
    },
    compact: Boolean
  },
  setup: function setup() {
    return {
      configProvider: inject('configProvider', ConfigConsumerProps)
    };
  },
  computed: {
    classes: function classes() {
      var _ref;

      var customizePrefixCls = this.prefixCls,
          size = this.size,
          _this$compact = this.compact,
          compact = _this$compact === void 0 ? false : _this$compact;
      var getPrefixCls = this.configProvider.getPrefixCls;
      var prefixCls = getPrefixCls('input-group', customizePrefixCls);
      return _ref = {}, _defineProperty(_ref, "".concat(prefixCls), true), _defineProperty(_ref, "".concat(prefixCls, "-lg"), size === 'large'), _defineProperty(_ref, "".concat(prefixCls, "-sm"), size === 'small'), _defineProperty(_ref, "".concat(prefixCls, "-compact"), compact), _ref;
    }
  },
  render: function render() {
    return _vue.createVNode("span", {
      "class": this.classes
    }, [getSlot(this)]);
  }
};