package com.atlassian.webdriver.bitbucket.element;


import com.atlassian.pageobjects.elements.ElementBy;
import com.atlassian.pageobjects.elements.PageElement;
import com.atlassian.webdriver.bitbucket.page.PullRequestPage;

public class PullRequestRemoveSelfDialog<T extends PullRequestPage> {

    private final T page;

    @ElementBy(cssSelector = ".remove-self-dialog .aui-button")
    private PageElement confirmButton;

    @ElementBy(cssSelector = ".remove-self-dialog .checkbox")
    private PageElement unwatchCheckbox;

    public PullRequestRemoveSelfDialog(T page) {
        this.page = page;
    }

    public T confirm() {
        confirmButton.click();
        return page;
    }

    public PageElement getUnwatchCheckbox() {
        return unwatchCheckbox;
    }
}
