<template>
  <Old
    v-if="faceApi!=='faceApi'"
    v-model="val"></Old>
  <New
    v-else
    v-model="val"></New>
</template>

<script>
import New from './new'
import Old from './old'
export default {
  props: {
    value: {
      type: String,
      default: ''
    },
    skipCheck: {
      type: Boolean,
      default: false
    }
  },
  provide () {
    return {
      skipCheck: this.skipCheck
    }
  },
  components: {
    New,
    Old
  },
  data () {
    return {
      val: '',
      faceApi: this.$localStore.get('faceApi') || 'faceApi'
    }
  },
  watch: {
    value: {
      handler (val) {
        this.val = val
      },
      immediate: true
    },
    val (v) {
      this.$emit('input', v)
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
