<template>
  <div class="flex flex-col p-4 space-y-2">
    <button
      v-for="item in menuItems"
      :key="item.label"
      @click="item.action"
    >
      \{{ item.label }}
    </button>
  </div>
</template>

<script setup lang="ts">
import { useI18n } from 'vue-i18n';
import { useAdminforth} from '@/adminforth';
import { onMounted } from 'vue';
import { AdminForthResourceCommon, AdminUser } from "@/types/Common";

const { t } = useI18n();

const { alert } = useAdminforth();

const props = defineProps<{
  record: any
  resource: AdminForthResourceCommon
  adminUser: AdminUser
  meta?: any
}>();

const menuItems = [
  {
    label: 'Show Success Alert',
    action: () => {
      alert({
        message: t('Success Alert'),
        variant: 'success',
      });
    },
  }
];

onMounted(() => {
  // Logic on mount if needed
});

</script>
