package com.airlock.iam.publicselfservice.application.configuration.ui;

import com.airlock.iam.flow.api.application.configuration.step.StepIdConfig;
import com.airlock.iam.flow.types.api.application.configuration.step.StepConfigForPublicSelfServiceFlows;
import com.airlock.iam.flow.ui.application.configuration.configurable.CustomJavaScriptStepUiConfig;
import com.airlock.iam.flow.ui.infrastructure.settings.annotation.UiForStep;
import com.airlock.iam.plugin.api.annotation.config.Plugin;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

@Plugin(
   description = "<p>User interface configuration for a custom JavaScript public self-service flow step.</p>\n<p>The step is accessible by the following URI:\n<tt>/&lt;loginapp-uri&gt;/ui/app/self-service/flow/default/ext/&lt;ID&gt;</tt></p>",
   displayName = "Custom JavaScript-based Public Self-Service UI"
)
@UiForStep(StepConfigForPublicSelfServiceFlows.class)
public final class CustomJavaScriptPublicSelfServiceStepUiConfig extends CustomJavaScriptStepUiConfig implements PublicSelfServiceStepUiConfig {
   public CustomJavaScriptPublicSelfServiceStepUiConfig(String pageId, StepIdConfig stepId, String stepAction) {
      super(pageId, stepId, stepAction);
   }

   @SuppressFBWarnings(justification = "generated code")
   public static CustomJavaScriptPublicSelfServiceStepUiConfig.CustomJavaScriptPublicSelfServiceStepUiConfigBuilder builder() {
      return new CustomJavaScriptPublicSelfServiceStepUiConfig.CustomJavaScriptPublicSelfServiceStepUiConfigBuilder();
   }

   @SuppressFBWarnings(justification = "generated code")
   public CustomJavaScriptPublicSelfServiceStepUiConfig() {
   }

   @SuppressFBWarnings(justification = "generated code")
   public static class CustomJavaScriptPublicSelfServiceStepUiConfigBuilder {
      @SuppressFBWarnings(justification = "generated code")
      private String pageId;
      @SuppressFBWarnings(justification = "generated code")
      private StepIdConfig stepId;
      @SuppressFBWarnings(justification = "generated code")
      private String stepAction;

      @SuppressFBWarnings(justification = "generated code")
      CustomJavaScriptPublicSelfServiceStepUiConfigBuilder() {
      }

      @SuppressFBWarnings(justification = "generated code")
      public CustomJavaScriptPublicSelfServiceStepUiConfig.CustomJavaScriptPublicSelfServiceStepUiConfigBuilder pageId(String pageId) {
         this.pageId = pageId;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public CustomJavaScriptPublicSelfServiceStepUiConfig.CustomJavaScriptPublicSelfServiceStepUiConfigBuilder stepId(StepIdConfig stepId) {
         this.stepId = stepId;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public CustomJavaScriptPublicSelfServiceStepUiConfig.CustomJavaScriptPublicSelfServiceStepUiConfigBuilder stepAction(String stepAction) {
         this.stepAction = stepAction;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public CustomJavaScriptPublicSelfServiceStepUiConfig build() {
         return new CustomJavaScriptPublicSelfServiceStepUiConfig(this.pageId, this.stepId, this.stepAction);
      }

      @SuppressFBWarnings(justification = "generated code")
      @Override
      public String toString() {
         return "CustomJavaScriptPublicSelfServiceStepUiConfig.CustomJavaScriptPublicSelfServiceStepUiConfigBuilder(pageId="
            + this.pageId
            + ", stepId="
            + this.stepId
            + ", stepAction="
            + this.stepAction
            + ")";
      }
   }
}
