using OpenQA.Selenium;

namespace ESuite.UI.E2E.Pages
{
    public class AddSpecificationsPage
    {
        private readonly IWebDriver driver;

        // Constructor to initialize the driver
        public AddSpecificationsPage(IWebDriver driver)
        {
            this.driver = driver;
        }

        // Page elements
        public static By PrintSpecificationSelector => By.CssSelector("#printSpecifications");
        public static By PrintSpecificationGlossaryItemField => By.CssSelector(".form-control .autocomplete-text-input");
        public static By PrintSpecificationSelectItem(string text) => By.XPath($"//div[contains(@class,'ck-content')]//tr[td[contains(text(),'{text}')]]//div/select");
        public static By PrintSpecificationMultiSelectField => By.CssSelector(".multiSelect .form-control .autocomplete-text-input");
        public static By PrintSpecificationMultiSelectItem(string text) => By.XPath($"//div[contains(@class,'ck-content')]//tr//button[contains(text(),'{text}')]/parent::li");
        public static By PrintSpecificationTextAreaItem(string text) => By.XPath($"//div[contains(@class,'ck-content')]//tr[td[contains(text(),'{text}')]]//div/textarea");
        public static By PrintSpecificationInputItem(string text) => By.XPath($"//div[contains(@class,'ck-content')]//tr[td[contains(text(),'{text}')]]//div/input");
    }
}
