package com.airlock.iam.servicecontainer.app.infrastructure.webapp.view;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.apache.commons.text.CaseUtils;
import org.apache.commons.text.WordUtils;

final class TaskNameUI {
   private final String name;

   static TaskNameUI taskNameUI(String name) {
      return new TaskNameUI(name);
   }

   String taskHtmlId() {
      return CaseUtils.toCamelCase(this.name, false, new char[]{'_', ' ', '-'});
   }

   String startStopTaskHtmlId() {
      return "startStop" + WordUtils.capitalize(this.taskHtmlId());
   }

   @SuppressFBWarnings(justification = "generated code")
   public String getName() {
      return this.name;
   }

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public boolean equals(Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof TaskNameUI other)) {
         return false;
      } else {
         Object this$name = this.name;
         Object other$name = other.name;
         return this$name == null ? other$name == null : this$name.equals(other$name);
      }
   }

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public int hashCode() {
      int PRIME = 59;
      int result = 1;
      Object $name = this.name;
      return result * 59 + ($name == null ? 43 : $name.hashCode());
   }

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "TaskNameUI(name=" + this.getName() + ")";
   }

   @SuppressFBWarnings(justification = "generated code")
   private TaskNameUI(String name) {
      this.name = name;
   }
}
