function useRegistryComputed (options = {}) {
  return {
    hasInitialValue () {
      return (
        (this.formulateValue && typeof this.formulateValue === 'object') ||
        (this.values && typeof this.values === 'object') ||
        (this.isGrouping && typeof this.context.model[this.index] === 'object')
      )
    },
    isVmodeled () {
      return !!(this.$options.propsData.hasOwnProperty('formulateValue') &&
        this._events &&
        Array.isArray(this._events.input) &&
        this._events.input.length)
    },
    initialValues () {
      if (
        has(this.$options.propsData, 'formulateValue') &&
        typeof this.formulateValue === 'object'
      ) {
        // If there is a v-model on the form/group, use those values as first priority
        return { ...this.formulateValue } // @todo - use a deep clone to detach reference types?
      } else if (
        has(this.$options.propsData, 'values') &&
        typeof this.values === 'object'
      ) {
        // If there are values, use them as secondary priority
        return { ...this.values }
      } else if (
        this.isGrouping && typeof this.context.model[this.index] === 'object'
      ) {
        return this.context.model[this.index]
      }
      return {}
    },
    mergedGroupErrors () {
      const hasSubFields = /^([^.\d+].*?)\.(\d+\..+)$/
      return Object.keys(this.mergedFieldErrors)
        .filter(k => hasSubFields.test(k))
        .reduce((groupErrorsByRoot, k) => {
          let [, rootField, groupKey] = k.match(hasSubFields)
          if (!groupErrorsByRoot[rootField]) {
            groupErrorsByRoot[rootField] = {}
          }
          Object.assign(groupErrorsByRoot[rootField], { [groupKey]: this.mergedFieldErrors[k] })
          return groupErrorsByRoot
        }, {})
    }
  }
}
Computed properties related to the registry.