using Common.Library;
using GreadyPoang.DataLayer;
using GreadyPoang.EntityLayer;
using GreadyPoang.Services;
using GreadyPoang.ViewModelLayer;
using System.Windows.Input;

namespace GreadyPoang.CommandClasses;

public class RoundRunningViewModelCommands : RoundRunningViewModel
{
    public RoundRunningViewModelCommands() : base()
    {
    }

    public RoundRunningViewModelCommands(
        IRepository<GameRound> roundsRepo,
        IRepository<GamePoint> pointsRepo,
        IMethodSharingService<Participant> sharingService,
        ICombinedRepository combined,
        IObjectMessageService objectMessage)
        : base(roundsRepo,
            pointsRepo,
            sharingService,
            combined,
            objectMessage)
    {
    }

    #region Commands
    public ICommand SaveCommand { get; private set; }
    public ICommand EditCommand { get; private set; }
    public ICommand RensaCommand { get; private set; }
    public ICommand ElementTappedCommand { get; private set; }
    public ICommand ParticipantTappedCommand { get; private set; }
    public ICommand StoreAndHandlePontsCommand { get; private set; }

    #endregion

    public override void Init()
    {
        base.Init();
        StoreAndHandlePontsCommand = new Command(async () => StoreAndHandle());
        //EditCommand = new Command<int>(async (id) => await EditAsync(id), (id) => id > 0);
        //RensaCommand = new Command(async () => RensaAsync());
        //ParticipantTappedCommand = new Command<RoundBuilderElement>(async (selectedParticipant) => SelectNewlyAddedParticipant(selectedParticipant));
        //ElementTappedCommand = new Command<RoundBuilderElement>((selectedElement) => RoundSelected(selectedElement));

    }

    private void StoreAndHandle()
    {
        throw new NotImplementedException();
    }
}
