import { Link, usePage } from '@inertiajs/react'; import { Building2, Users } from 'lucide-react'; import { cn } from '@/lib/utils'; export function TenantAdminNav({ tenantId }: { tenantId: number }) { const { auth } = usePage().props; const base = `/administration/tenants/${tenantId}`; const allowed = (permission: string) => auth.user.is_platform_admin || auth.permissions.includes(permission); const items = [ { label: 'Tenant', href: `${base}/edit`, icon: Building2, show: auth.user.is_platform_admin, }, { label: 'Users', href: `${base}/users`, icon: Users, show: allowed('user.view'), }, ]; return ( ); }