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

// --- Props ---

const props = makePropsConfigurable({
  plain: makeProp(PROP_TYPE_BOOLEAN, false)
}, 'formControls');

// --- Mixin ---

// @vue/component
const formCustomMixin = extend({
  props,
  computed: {
    custom() {
      return !this.plain;
    }
  }
});

export { formCustomMixin, props };
