<template>
  <image-player-picker ref="imagePlayerPicker" :ID.sync="ID"></image-player-picker>
</template>

<script>
import ImagePlayerPicker from './ImagePlayerPicker.vue'

export default {
  components: {
    'image-player-picker': ImagePlayerPicker
  },
  data() {
    return {
      ID: ''
    }
  },
  mounted () {
    window.forDialogOnOk = this.forDialogOnOk
  },
  methods: {
    forDialogOnOk(func) {
      const imagePlayer = this.$refs['imagePlayerPicker'].imagePlayer
      if (func && imagePlayer) {
        func(imagePlayer)
      }
    }
  }
}
</script>
