using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FWHandler
{
   public class ButtonHandler
    {
        IFWButtons controller;
        public ButtonHandler(IFWButtons controller)
        {
            this.controller = controller;
        }   
        public ButtonHandler InvokeByName(string name, int repeatingTime = 0)
        {
            controller.ButtonInvokeByName(name, repeatingTime);
            return new ButtonHandler(controller);
        }

        public ButtonHandler InvokeByAutoID(string name, int repeatingTime = 0)
        {
            controller.ButtonInvokeByAutomationID(name, repeatingTime);
            return new ButtonHandler(controller);
        }
        public ButtonHandler Invoke(string name, int repeatingTime = 0)
        {
            controller.ButtonInvokeBy(name, repeatingTime);
            return new ButtonHandler(controller);
        }
        public ButtonHandler ClickByName(string name, int repeatingTime = 0)
        {
            controller.ButtonClickByName(name, repeatingTime);
            return new ButtonHandler(controller);
        }

        public ButtonHandler ClickByAutoID(string name, int repeatingTime = 0)
        {
            controller.ButtonClickByAutomationID(name, repeatingTime);
            return new ButtonHandler(controller);
        }
        public ButtonHandler Click(string name, int repeatingTime = 0)
        {
            controller.ButtonClickBy(name, repeatingTime);
            return new ButtonHandler(controller);
        }
        public ButtonHandler DoubleClick(string name, int repeatingTime = 0)
        {
            controller.ButtonDoubleClickBy(name, repeatingTime);
            return new ButtonHandler(controller);
        }
        public bool IsEnabled(string value, int repeatingTime = 0)
        {
            if (controller.ButtonIsEnabled(value, repeatingTime) == true)
            {
                return true;
            }
            else return false;
        }
        public bool Exist(string value, int repeatingTime = 0)
        {
            if (controller.ButtonExist(value, repeatingTime) == true)
            {
                return true;
            }
            else return false;
        }
        public bool IsVisible(string value, int repeatingTime = 0)
        {
            if (controller.ButtonIsVisible(value, repeatingTime) == true)
            {
                return true;
            }
            else return false;
        }


    }
}







/* public ButtonHandler FindElementBy(string name)
       {
           controller.FindElementBy(name);
           return new ButtonHandler(controller);
       }*/

/*public ButtonHandler FindNestedBy(string name)
{
    controller.FindNestedBy(name);
    return new ButtonHandler(controller);
}

public ButtonHandler FindElementBy(string name)
{
    controller.FindElementBy(name);
    return new ButtonHandler(controller);
}*/
