package jwebform.element.structure;

public interface ElementRenderer {

  String renderInput(
      String type,
      ProducerInfos pi,
      OneFieldDecoration decoration,
      String additional);

  String renderInputComplex(
      String tagname,
      String inBetweenHtml,
      ProducerInfos pi,
      OneFieldDecoration decoration);

  String renderInputFree(
      String free,
      ProducerInfos pi,
      OneFieldDecoration decoration,
      InputVariant variant);


  String renderAriaDescribedBy(ProducerInfos pi, OneFieldDecoration decoration);

  String renderValue(String value);

  // This may be used, to render label for radio-inputs. No error-highlighting, no required
  // highlighting!
  String renderSimpleLabel(String forAttribute, String label);


  public static enum InputVariant {
    normal, select, radio, checkbox
  }
}

@@ -66,16 +66,77 @@
 erer %7B%0A%0A
+  // Renders a single input-element including label and help%0A
   String
@@ -149,16 +149,16 @@
 rInput(%0A
-
       St
@@ -252,24 +252,104 @@
 ditional);%0A%0A
+  // renders an input value, that is not a typical input (for example TextArea)%0A
   String ren
@@ -470,32 +470,101 @@
 n decoration);%0A%0A
+  // just renders label and help, provide the input-element yourself%0A
   String renderI
@@ -683,17 +683,47 @@
 iant);%0A%0A
+  // render the aria attribute
 %0A
-
   String
@@ -796,16 +796,48 @@
 tion);%0A%0A
+  // render the value attribute%0A
   String

add documentation