import BasePage from '../../../base.js'

export default class LandingPage extends BasePage {
    /**
    * @type string
    */
    get layoutAppShell() {
    let path = '//ux-layout-app-shell';
    return this.root + path;
    }
    /**
    * @type string
    */
   get mainContent() {
    let path = '//div[@id = "main-content"]';
    return this.layoutAppShell + path;
    }
    /**
    * @type string
    */
    get welcomeText() {
    let path = '//div[contains(@class, "masthead__teaser")]/h1';
    return this.mainContent + path;
    }
    /**
    * @type string
    * @param text string
    */
    getlinkByText(text) {
        let path = '//a[contains(text(), "' + text + '")]';
        return this.mainContent + path;
    }
    // Cookie section
    /**
    * @type string
    */
    get cookieBanner() {
        let path = '//div[@id = "cookie-consent-banner"]';
        return this.root + path;
    }
    /**
    * @type string
    */
    get cookieBannerAcceptLink() {
        let path = '//a[@class = "wt-cck-btn-add"]';
        return this.cookieBanner + path;
    }
    /**
    * @type string
    */
    get cookieBannerRefuseLink() {
        let path = '//a[@class = "wt-cck-btn-refuse"]';
        return this.cookieBanner + path;
    }
    /**
    * @type string
    * @param text string
    */
    getEuiShowcaseContainerByText(text) {
        let path = '//*[contains(text(), "' + text + '")]/ancestor::div[contains(@class, "flex-container")][1]';
        return this.root + path;
    }
    /**
    * @type string
    * @param text string
    */
    getEuiLastVersionButtonFromContainerWithText(text) {
        let path = '//button[contains(@class, "btn-success")]';
        return this.getEuiShowcaseContainerByText(text) + path;
    }
}
