function addInput(parameter) {
  let type = parameter.type
  let options = parameter.options
  let currentValue = parameter.currentValue
  let model_values = parameter.options.model_values
  switch (type) {
    case "slider":
      return html`
        ${model_values.map(
          (value, index) => html`
            <wl-slider
              thumbLabel
              min=${options.min_value}
              max=${options.max_value}
              step=${options.step}
              buffervalue=${currentValue}
              oninput=${changeValue.bind(index)}
              label=${value}
            >
              <span slot="before">${options.min_value}</span>
              <span slot="after">${options.max_value}</span>
            </wl-slider>
          `
        )}
      `
    case "number":
      return html`
        <wl-textfield
          type="number"
          min=${options.min_value}
          max=${options.max_value}
          step=${options.step}
          value=${options.value}
          oninput=${changeValue}
        ></wl-textfield>
      `
    case "choice":
      return html`
        ${model_values.map(
          (value, index) => html`
            <wl-select oninput=${changeValue.bind(index)}>
              ${options.choices.map(
                option =>
                  html`
                    <option>${option}</option>
                  `
              )}
            </wl-select>
          `
        )}
      `
    case "checkbox":
      return html`
        ${options.value
          ? html`
              <wl-switch checked></wl-switch>
            `
          : html`
              <wl-switch></wl-switch>
            `}
      `
    case "static_text":
      return html`
        <wl-text>${options.value}</wl-text>
      `

    default:
      console.log("Unexpected parameter type:")
      console.log(type)
  }
}
/**
 * Create input elements based on the type of the input parameter
 * @param {Parameter} parameter - Input parameter
 */
Create input elements based on the type of the input parameter
@param {Parameter} parameter - Input parameter
Create input elements based on the type of the input parameter @param { Parameter } parameter - Input parameter
function addInput(parameter) {
  let type = parameter.type
  let options = parameter.options
  let currentValue = parameter.currentValue
  let model_values = parameter.options.model_values
  switch (type) {
    case "slider":
      return html`
        ${model_values.map(
          (value, index) => html`
            <wl-slider
              thumbLabel
              min=${options.min_value}
              max=${options.max_value}
              step=${options.step}
              buffervalue=${currentValue}
              oninput=${changeValue.bind(index)}
              label=${value}
            >
              <span slot="before">${options.min_value}</span>
              <span slot="after">${options.max_value}</span>
            </wl-slider>
          `
        )}
      `
    case "number":
      return html`
        <wl-textfield
          type="number"
          min=${options.min_value}
          max=${options.max_value}
          step=${options.step}
          value=${options.value}
          oninput=${changeValue}
        ></wl-textfield>
      `
    case "choice":
      return html`
        ${model_values.map(
          (value, index) => html`
            <wl-select oninput=${changeValue.bind(index)}>
              ${options.choices.map(
                option =>
                  html`
                    <option>${option}</option>
                  `
              )}
            </wl-select>
          `
        )}
      `
    case "checkbox":
      return html`
        ${options.value
          ? html`
              <wl-switch checked></wl-switch>
            `
          : html`
              <wl-switch></wl-switch>
            `}
      `
    case "static_text":
      return html`
        <wl-text>${options.value}</wl-text>
      `
    default:
      console.log("Unexpected parameter type:")
      console.log(type)
  }
}
function addInput ( parameter ) { let type = parameter . type let options = parameter . options let currentValue = parameter . currentValue let model_values = parameter . options . model_values switch ( type ) { case "slider" : return html ` ${ model_values . map ( ( value , index ) => html ` ${ options . min_value } ${ options . max_value } ${ options . step } ${ currentValue } ${ changeValue . bind ( index ) } ${ value } ${ options . min_value } ${ options . max_value } ` ) } ` case "number" : return html ` ${ options . min_value } ${ options . max_value } ${ options . step } ${ options . value } ${ changeValue } ` case "choice" : return html ` ${ model_values . map ( ( value , index ) => html ` ${ changeValue . bind ( index ) } ${ options . choices . map ( option => html ` ${ option } ` ) } ` ) } ` case "checkbox" : return html ` ${ options . value ? html ` ` : html ` ` } ` case "static_text" : return html ` ${ options . value } ` default : console . log ( "Unexpected parameter type:" ) console . log ( type ) } }
Create input elements based on the type of the input parameter
 @param {Parameter} parameter - Input parameter
Create input elements based on the type of the input parameter @param { Parameter } parameter - Input parameter