<script setup lang="ts">
import {RouterView} from 'vue-router';
import {CreateLedgerModal} from "@/ledger";
import {ref} from "vue";
import {processingApi} from "@/mammon";

const createLedgerModal = ref<typeof CreateLedgerModal>();
</script>

<template>
    <div class="mt-4">
      <div class="mb-4 border-b-1 flex justify-end">
        <button class="mb-2 ms-2" @click="processingApi.processNewActivities()">Process Activities</button>
        <button class="mb-2 ms-2" @click="createLedgerModal?.open()">New Ledger</button>
      </div>
      <CreateLedgerModal ref="createLedgerModal" />
      <RouterView />
    </div>
</template>
