import { extend } from '../vue';
import { PROP_TYPE_STRING } from '../constants/props';
import { makePropsConfigurable, makeProp } from '../utils/props';

// --- Props ---

const props = makePropsConfigurable({
  size: makeProp(PROP_TYPE_STRING)
}, 'formControls');

// --- Mixin ---

// @vue/component
const formSizeMixin = extend({
  props,
  computed: {
    sizeFormClass() {
      return [this.size ? `form-control-${this.size}` : null];
    }
  }
});

export { formSizeMixin, props };
