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

namespace FWHandler
{
    public class RadioButtonHandler
    {
        IFWRadioButtons controller;

        public RadioButtonHandler(IFWRadioButtons controller)
        {
            this.controller = controller;
        }

        public RadioButtonHandler Click(string value, int repeatingTime = 0)
        {
            controller.RadioButtonClickBy(value, repeatingTime);
            return new RadioButtonHandler(controller);
        }
        public RadioButtonHandler DoubleClick(string value, int repeatingTime = 0)
        {
            controller.RadioButtonDoubleClickBy(value, repeatingTime);
            return new RadioButtonHandler(controller);
        }

        public RadioButtonHandler ClickByName(string value, int repeatingTime = 0)
        {
            controller.RadioButtonClickByName(value, repeatingTime);
            return new RadioButtonHandler(controller);
        }

        public RadioButtonHandler ClickByAutoId(string value, int repeatingTime = 0)
        {
            controller.RadioButtonClickByAutoID(value, repeatingTime);
            return new RadioButtonHandler(controller);
        }
        public bool IsChecked(string value, int repeatingTime = 0)
        {
            if (controller.RadioIsChecked(value, repeatingTime) == true)
            {
                return true;
            }
            else return false;
        }
        public bool IsVisible(string value, int repeatingTime = 0)
        {
            if (controller.RadioButtonIsVisible(value, repeatingTime) == true)
            {
                return true;
            }
            else return false;
        }
        public bool Exist(string value, int repeatingTime = 0)
        {
            if (controller.RadioButtonExist(value, repeatingTime) == true)
            {
                return true;
            }
            else return false;
        }
    }
}
