<script setup lang="ts">
interface FileIconConfig {
  type: string;
}

const props = defineProps<FileIconConfig>();
</script>

<template>
  <i class="fa fa-file-pdf-o" v-if="props.type === 'application/pdf'"></i>
  <i
    class="fa fa-file-word-o"
    v-else-if="props.type === 'application/vnd.oasis.opendocument.text'"
  ></i>
  <i
    class="fa fa-file-word-o"
    v-else-if="
      props.type ===
      'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
    "
  ></i>
  <i
    class="fa fa-file-word-o"
    v-else-if="props.type === 'application/msword'"
  ></i>
  <i
    class="fa fa-file-excel-o"
    v-else-if="
      props.type ===
      'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
    "
  ></i>
  <i
    class="fa fa-file-excel-o"
    v-else-if="props.type === 'application/vnd.ms-excel'"
  ></i>
  <i class="fa fa-file-image-o" v-else-if="props.type === 'image/jpeg'"></i>
  <i class="fa fa-file-image-o" v-else-if="props.type === 'image/png'"></i>
  <i
    class="fa fa-file-archive-o"
    v-else-if="props.type === 'application/x-zip-compressed'"
  ></i>
  <i class="fa fa-file-code-o" v-else></i>
</template>

<style scoped lang="scss"></style>
