import nav from 'bitbucket/util/navbuilder';
import pageState from 'bitbucket/internal/model/page-state';

export default action => {

    const builder = nav.rest().currentPullRequest()[action]().withParams({
        avatarSize: bitbucket.internal.widget.avatarSizeInPx({ size: 'xsmall' }),
        version: pageState.getPullRequest().getVersion()
    });

    return builder.build();
}
