import 'package:flutter/material.dart';

import 'package:pweb/controllers/dashboard/balance/source_actions.dart';
import 'package:pweb/pages/dashboard/buttons/balance/actions/bar.dart';


class LedgerSourceActions extends StatelessWidget {
  final String ledgerAccountRef;
  final VoidCallback onAddFunds;
  final VoidCallback onWalletDetails;

  const LedgerSourceActions({
    super.key,
    required this.ledgerAccountRef,
    required this.onAddFunds,
    required this.onWalletDetails,
  });

  @override
  Widget build(BuildContext context) {
    const controller = BalanceSourceActionsController();
    final state = controller.ledger(
      context: context,
      ledgerAccountRef: ledgerAccountRef,
      onAddFunds: onAddFunds,
      onWalletDetails: onWalletDetails,
    );

    return BalanceActionsBar(state: state);
  }
}
