<template>
  <new-client-template>
    <template #multi-step> </template>
    <template #client-form>
      <new-client-form
        :categories="categories"
        :loading="loading"
        :validation-errors="validationErrors"
        :success="success"
        @create-client="handleCreateClient"
      />
    </template>
  </new-client-template>
</template>
<script setup>
import NewClientTemplate from "@/components/templates/CRM/NewClientTemplate.vue";
import NewClientForm from "@/components/molecules/form/NewClientForm.vue";
import { defineProps, defineEmits } from "vue";

defineProps({
  categories: {
    type: Array,
    default: [],
  },
  loading: {
    type: Boolean,
    default: false,
  },
  validationErrors: {
    type: Object,
    default: () => ({}),
  },
  success: {
    type: Boolean,
    default: false,
  },
});

const emit = defineEmits(["createClient"]);

const handleCreateClient = (data) => {
  emit("createClient", data);
};
</script>
