<script setup lang="ts">
type ClickType = 'cancel' | 'submit'

const emit = defineEmits<{
  (e: 'click', type: ClickType): void
}>()

function onClick(type: ClickType) {
  emit('click', type)
}
</script>

<template>
  <div class="m-2 flex gap-2 px-2">
    <Button class="bg-gray-400" @click="onClick('cancel')">
      <Icon name="i-lucide-arrow-left" class="me-2 align-middle" />
      Back
    </Button>
    <Button class="bg-primary" @click="onClick('submit')">
      <Icon name="i-lucide-check" class="me-2 align-middle" />
      Submit
    </Button>
  </div>
</template>
