<template>
  <div class="column flex-grow q-pa-md">
    <PartnerDashboardStats :stats="stats" />
  </div>
</template>

<script setup>
import { ref, onMounted } from "vue";

import PartnerDashboardStats from "src/pages/parceiros-convenios/components/PartnerDashboardStats.vue";
import { getPartnerDashboard } from "src/api/dashboard";

const stats = ref({
  authorization: 0,
  scheduling: 0,
  completed: 0,
  not_authorized: 0,
});

onMounted(async () => {
  try {
    stats.value = await getPartnerDashboard();
  } catch (error) {
    console.error(error);
  }
});
</script>