import { useDeletedPagesQuery, useRestorePageMutation, useDeletePageMutation } from "@/features/page/queries/page-query.ts";
import { modals } from "@mantine/modals";
import { ActionIcon, Menu, Table, Text } from "@mantine/core";
import { IconDots } from "@tabler/icons-react";
interface RecycledPagesProps {
spaceId: string;
readOnly?: boolean;
}
export default function RecycledPagesList({
spaceId,
readOnly,
}: RecycledPagesProps) {
const { data, isLoading } = useDeletedPagesQuery(spaceId);
const restorePageMutation = useRestorePageMutation();
const removePageMutation = useDeletePageMutation();
const handleRestorePage = async (pageId: string) => {
await restorePageMutation.mutateAsync(pageId);
};
const handleRemovePage = async (pageId: string) => {
await removePageMutation.mutateAsync(pageId);
};
const openRemovePageModal = (pageId: string) =>
modals.openConfirmModal({
title: "Delete page permanently",
children: (