'use client';

import type { ProfileLeaguesPageDto } from '@/lib/page-queries/page-queries/ProfileLeaguesPageQuery';
import { ProfileLeaguesPresenter } from '@/lib/presenters/ProfileLeaguesPresenter';
import { ProfileLeaguesTemplate } from '@/templates/ProfileLeaguesTemplate';

interface ProfileLeaguesPageClientProps {
  pageDto: ProfileLeaguesPageDto;
}

export function ProfileLeaguesPageClient({ pageDto }: ProfileLeaguesPageClientProps) {
  // Convert Page DTO to ViewData using Presenter
  const viewData = ProfileLeaguesPresenter.toViewData(pageDto);

  // Render Template with ViewData
  return <ProfileLeaguesTemplate viewData={viewData} />;
}