package com.atlassian.stash.internal.web.soy.functions.nav;

import com.atlassian.stash.internal.web.soy.functions.SoyArgumentUtils;
import com.atlassian.bitbucket.nav.NavBuilder;
import com.atlassian.soy.renderer.JsExpression;

public class AdminUserViewNavFunction extends BaseNavFunction {

    public AdminUserViewNavFunction(NavBuilder navBuilder) {
        super(navBuilder, "nav_admin_user", 1);
    }

    @Override
    protected JsNavBuilder initJsBuilder(JsExpression... jsExpressions) {
        return new JsNavBuilder().admin().users().view(jsExpressions[0]);
    }

    @Override
    protected NavBuilder.Builder initBuilder(Object... args) {
        return navBuilder.admin().users().view(SoyArgumentUtils.getStringArgument(args, 0));
    }

}
