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

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

public class AdminUserCaptchaNavFunction extends BaseNavFunction {

    public AdminUserCaptchaNavFunction(NavBuilder navBuilder) {
        super(navBuilder, "nav_admin_user_captcha", 1);
    }

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

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

}
