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

namespace FWHandler
{
    public class MenuItemHandler
    {
        IFWMenus controller;
        public MenuItemHandler(IFWMenus controller)
        {
            this.controller = controller;
        }
        public MenuItemHandler Invoke(string name, int repeatingTime = 0)
        {
            controller.MenuItemInvokeByName(name, repeatingTime);
            return new MenuItemHandler(controller);
        }
        public MenuItemHandler Click(string name, int repeatingTime = 0)
        {
            controller.MenuItemClickByName(name, repeatingTime);
            return new MenuItemHandler(controller);
        }
        public MenuItemHandler DoubleClick(string name, int repeatingTime = 0)
        {
            controller.MenuItemDoubleClickByName(name, repeatingTime);
            return new MenuItemHandler(controller);
        }
        public MenuItemHandler RightClick(string name, int repeatingTime = 0)
        {
            controller.MenuItemRightClickByName(name, repeatingTime);
            return new MenuItemHandler(controller);
        }
        public bool Exist(string name, int repeatingTime = 0)
        {
            if (controller.MenuItemExist(name, repeatingTime) == true)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        public bool IsVisible(string name, int repeatingTime = 0)
        {
            if (controller.MenuItemIsVisible(name, repeatingTime) == true)
            {
                return true;
            }
            else
            {
                return false;
            }
        }


    }
}


/* public MenuItemHandler InvokeNext(string name)
       {
           FlaUIHandler.MenuItemInvokeAfterByName(name);
           return new MenuItemHandler();
       }*/
