<script lang="ts">
import CommentThread from './CommentThread.svelte';
import type { Comment } from '$lib/types';

type Props = {
	documentId: string;
	initialComments: Comment[];
	canComment: boolean;
	currentUserId: string | null;
	canAdmin: boolean;
};

let { documentId, initialComments, canComment, currentUserId, canAdmin }: Props = $props();
</script>

<div class="flex-1 overflow-y-auto p-6">
	<CommentThread
		documentId={documentId}
		initialComments={initialComments}
		canComment={canComment}
		currentUserId={currentUserId}
		canAdmin={canAdmin}
	/>
</div>
