<script setup lang="ts">
import AppButton from '../AppButton.vue'

defineEmits<{ cancel: [] }>()
defineProps<{ submitText?: string; cancelText?: string; disabled?: boolean }>()
</script>
<template>
  <div class="app-form-actions">
    <AppButton
      type="submit"
      :disabled="disabled ?? false"
      >{{ submitText ?? 'Submit' }}</AppButton
    >
    <AppButton
      theme="secondary"
      @click="$emit('cancel')"
      >{{ cancelText ?? 'Cancel' }}</AppButton
    >
  </div>
</template>
<style lang="css">
.app-form-actions {
  text-align: right;
}
</style>
