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

namespace FWHandler
{
    public class ListItemHandler
    {
        IFWLists controller;
        public ListItemHandler(IFWLists controller)
        {
            this.controller = controller;
        }
        public ListItemHandler Click(string value, int id, int repeatingTime = 0)
        {
            controller.ListClickBy(value, id, repeatingTime);
            return new ListItemHandler(controller);
        }
        public ListItemHandler DoubleClick(string value, int id, int repeatingTime = 0)
        {
            controller.ListDoubleClickBy(value, id, repeatingTime);
            return new ListItemHandler(controller);
        }
        public ListItemHandler Click(string value, int repeatingTime = 0)
        {
            controller.ListItemClickBy(value, repeatingTime);
            return new ListItemHandler(controller);
        }
        public ListItemHandler DoubleClick(string value, int repeatingTime = 0)
        {
            controller.ListItemDoubleClickBy(value, repeatingTime);
            return new ListItemHandler(controller);
        }
        public bool ListItemExist(string value, int repeatingTime = 0)
        {
            if ((controller.ListItemExist(value, repeatingTime)) == true)
            {
                return true;
            }
            else return false;
        }
        public bool ListItemExist(string value,int id, int repeatingTime = 0)
        {
            if ((controller.ListItemExist(value, id, repeatingTime)) == true)
            {
                return true;
            }
            else return false;
        }
    }
}
