<template>
  <div class="mch-import-photos">
    <div class="import-btn tc cursor" :class="size" @click="openFileSelect('photo')">
      <Icon type="md-images" size="18" style="margin-right: 5px;"/>
      导入图像
      <div>.jpg .tif</div>
    </div>
    <div class="import-btn tc cursor" :class="size" @click="openFileSelect('folder')">
      <Icon type="md-folder" size="18" style="margin-right: 5px;"/>
      导入文件夹
      <div>.jpg .tif</div>
    </div>
    <div class="import-btn tc cursor" :class="size" @click="openFileSelect('video')" v-if="enableVideo">
      <Icon type="md-videocam" size="18" style="margin-right: 5px;"/>
      导入视频
      <div>.mp4</div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    enableVideo: {
      type: Boolean,
      default: false
    },
    size: {
      type: String,
      default: 'normal'
    }
  },
  methods: {
    openFileSelect(type) {
      this.$emit('on-click', type)
    }
  }
}
</script>