package com.atlassian.webdriver.bitbucket.page;

import com.atlassian.pageobjects.elements.ElementBy;
import com.atlassian.webdriver.bitbucket.element.UnifiedDiffFileContent;

public class CommitUnifiedDiffPage extends BaseCommitDiffPage {

    @ElementBy(cssSelector = ".file-content", pageElementClass = UnifiedDiffFileContent.class)
    protected UnifiedDiffFileContent fileContent;

    public CommitUnifiedDiffPage(String projectKey, String slug, String commit) {
        super(projectKey, slug, commit);
    }

    public CommitSideBySideDiffPage switchToSideBySide() {
        openDropdownSelector().selectSideBySide();
        return pageBinder.bind(CommitSideBySideDiffPage.class, projectKey, slug, commit);
    }

    public UnifiedDiffFileContent getFileContent() {
        return fileContent;
    }
}
