'use server';

import {
  AccountBalanceService,
  AccountBalanceSummary,
} from '@kit/accounts/services/account-balance.service';

export async function getAccountBalanceSummary(
  accountId: string,
): Promise<AccountBalanceSummary | null> {
  try {
    const service = new AccountBalanceService();
    return await service.getBalanceSummary(accountId);
  } catch (error) {
    console.error('Error getting account balance summary:', error);
    return null;
  }
}
