<!--
bouton Créer
-->

<template>
  <main>
    <v-btn
      elevation="2"
      color="ot_warning ot_white--text"
      @click="showDialog=true"
    >
      {{ $t('create') }}
    </v-btn>
    <lazy-LayoutDialog
      :show="showDialog"
    >

      <template v-slot:dialogType>Assistant de création</template>
      <template v-slot:dialogTitle>Que souhaitez-vous créer ?</template>
      <template v-slot:dialogText>
        <LayoutHeaderUniversalCreationGenerateCardsSteps :step="step" @updateStep="step=$event" />

      </template>
      <template v-slot:dialogBtn>
        <div class="text-center">
          <v-btn
            color="ot_super_light_grey"
            @click="showDialog=false;step=1"
          >
            Annuler
          </v-btn>
          <v-btn
            v-if="step > 1"
            color="ot_super_light_grey"
            @click="step=1"
          >
            Précedent
          </v-btn>
        </div>
      </template>
    </lazy-LayoutDialog>
  </main>
</template>

<script lang="ts">
import {defineComponent, Ref,ref} from '@nuxtjs/composition-api'

export default defineComponent({
  setup () {
    const showDialog:Ref<Boolean> = ref(false);
    const step:Ref<Number> = ref(1);
    return {
      showDialog,
      step
    }
  }
})
</script>
<style scoped>

</style>
