<script setup lang="ts">
import Action from '~/components/pub/custom-ui/nav-footer/ba-dr-su.vue'

const data = ref({
  name: '',
  password: '',
  status: '',
  type: '',
})

function onClick(type: string) {
  if (type === 'cancel') {
    navigateTo('/human-src/employee')
  } else if (type === 'draft') {
    // do something
  } else if (type === 'submit') {
    // do something
  }
}
</script>

<template>
  <div class="mb-5 border-b border-b-slate-300 pb-3 text-lg xl:text-xl">
    <Icon name="i-lucide-user" class="me-2" />
    <span class="font-semibold">Tambah</span> Dokter
  </div>
  <div>
    <AppDoctorEntryForm v-if="data.type === 'doctor'" v-model="data" />
  </div>
  <AppUserEntryForm v-model="data" />
  <div class="my-2 flex justify-end py-2">
    <Action @click="onClick" />
  </div>
</template>
