/*
 *                                      Copyright 2025 WebPros International, LLC
 *                                                           All rights reserved.
 * copyright@cpanel.net                                         http://cpanel.net
 * This code is subject to the cPanel license. Unauthorized copying is prohibited.
 */

import { type Page, type Locator } from "@playwright/test";
import { CpanelPage, type CpanelServiceAccount } from "@page/cpanel/cpanel";
import { type TeamUser } from "@classes/account/team_user";

export class SitejetBannerAI extends CpanelPage {
    /** The Sitejet banner element*/
    sitejetBannerElement: Locator;
    /** The Sitejet banner primary ad image*/
    sitejetBannerPhoto: Locator;
    /** The Sitejet banner Headline */
    sitejetBannerHeadline: Locator;
    /** The Sitejet banner container close button*/
    sitejetBannerCloseButton: Locator;
    /** The Sitejet Title in French locale*/
    sitejetBannerTitleFrench: Locator;
    /** The Sitejet SVG */
    sitejetBannerSVG: Locator;
    /** The Sitejet Get Started button*/
    sitejetGetStartedButton: Locator;
    featurelist: Locator;

    constructor(page: Page, account: CpanelServiceAccount | TeamUser) {
        super(page, account);

        // Locators for the Sitejet banner
        this.sitejetBannerElement = this.page.locator("cp-sitejet-ai-banner");
        this.sitejetBannerPhoto = this.sitejetBannerElement.getByTestId(
            "cta-background__image-mobile"
        );
        this.sitejetBannerHeadline =
            this.sitejetBannerElement.getByTestId("banner-headline");
        this.sitejetBannerCloseButton = this.sitejetBannerElement.getByTestId(
            "banner-close__button"
        );
        this.featurelist =
            this.sitejetBannerElement.getByTestId("feature-list");

        this.sitejetBannerTitleFrench = this.sitejetBannerHeadline.getByText(
            "Génération du site web"
        );
        this.sitejetBannerSVG =
            this.sitejetBannerElement.getByTestId("banner-logo");

        this.sitejetGetStartedButton =
            this.sitejetBannerElement.getByTestId("banner-cta");
    }
}
