<template>
  <div>
    <q-btn
      color="primary"
      :label="$t('userTask.loadSchemes')"
      @click="uploaderHandler"
    >
      <template #loading>
        <q-spinner-gears />
      </template>
    </q-btn>
    <q-dialog v-model="dialog" full-width position="bottom">
      <q-card class="no-shadow">
        <q-card-section>
          <div class="text-h6">
            {{ $t('userTask.loadSchemes') }}
          </div>
        </q-card-section>
        <q-card-section>
          <m-file-loader
            @validateFiles="validateFileNames"
            :error="!!errorMessage"
            :error-message="errorMessage"
            :loading="loading"
            @sendFiles="sendFiles"
          />
        </q-card-section>
      </q-card>
    </q-dialog>
  </div>
</template>

<script lang="ts" src="./index.ts"></script>

<style scoped></style>
