package com.atlassian.webdriver.bitbucket.page;

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

public class CommitSideBySideDiffPage extends BaseCommitDiffPage {

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

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

    public CommitUnifiedDiffPage switchToUnified() {
        openDropdownSelector().selectUnified();
        return pageBinder.bind(CommitUnifiedDiffPage.class, projectKey, slug, commit);
    }

    public SideBySideDiffFileContent getFileContent() {
        return fileContent;
    }
}
