'use client';

import { Permission } from '@pac/types';
import { Can } from '@/components/can';
import { Card, CardContent } from '@/components/ui/card';
import { AiInvocationsListApp } from '@/components/ai-invocations/ai-invocations-list-app';

export default function AiInvocationsListPage() {
  return (
    <Can
      perm={Permission.PLATFORM_MANAGE}
      fallback={
        <main className="container mx-auto max-w-3xl p-8">
          <Card>
            <CardContent className="py-10 text-center text-sm text-muted-foreground">
              需要 admin 权限才能查看 AI 调用调试页。
            </CardContent>
          </Card>
        </main>
      }
    >
      <AiInvocationsListApp />
    </Can>
  );
}
