template() {
    if (!this.id) {
      this.setAttribute(attributes.ID, `ids-spinbox-${++instanceCounter}`);
    }

    const disabledAttribHtml = this.hasAttribute(attributes.DISABLED)
      ? ' disabled'
      : '';

    const buttonDisabledAttribHtml = (
      this.hasAttribute(attributes.DISABLED) || this.hasAttribute(attributes.READONLY)
    ) ? ' disabled' : '';

    const labelHtml = this.labelHidden ? '<span></span>' : (
      `<label
        ${ buildClassAttrib('ids-label-text', this.disabled && 'disabled') }
        part="label"
        for="${this.id}-input-input"
      >
        <ids-text label ${disabledAttribHtml}>${this.label}</ids-text>
      </label>`
    );

    return (
      `<div
        ${buildClassAttrib(
        'ids-spinbox',
        this.hasAttribute(attributes.DISABLED) && 'disabled',
        this.hasAttribute(attributes.READONLY) && 'readonly'
      ) }
        part="container">
          ${labelHtml}
          <div class="ids-spinbox-content">
            <ids-button
              type="tertiary"
              part="button"
              tabindex="-1"
              ${buttonDisabledAttribHtml}
            ><ids-text
              label
              font-size="16"
              font-weight="bold"
              ${buttonDisabledAttribHtml}
            >-</ids-text>
            </ids-button>
            <ids-input
              text-align="center"
              value=${this.value}
              id="${this.id}-input"
              label="${this.label}"
              label-hidden="true"
              ${this.placeholder ? ` placeholder="${this.placeholder}"` : ''}
              ${disabledAttribHtml}
              part="input"
            ></ids-input>
            <ids-button
              type="tertiary"
              part="button"
              tabindex="-1"
              ${buttonDisabledAttribHtml}
            ><ids-text
              label
              font-size="16"
              font-weight="bold"
              ${buttonDisabledAttribHtml}
            >+</ids-text>
            </ids-button>
          </div>
          ${this.validate ? '<div class="validation-message" part="validation"></div>' : ''}
      </div>`
    );
  }
/**
   * Create the Template for the contents
   * @returns {string} the template to render
   */
Create the Template for the contents
@returns {string} the template to render
Create the Template for the contents @returns { string } the template to render
template() {
    if (!this.id) {
      this.setAttribute(attributes.ID, `ids-spinbox-${++instanceCounter}`);
    }
    const disabledAttribHtml = this.hasAttribute(attributes.DISABLED)
      ? ' disabled'
      : '';
    const buttonDisabledAttribHtml = (
      this.hasAttribute(attributes.DISABLED) || this.hasAttribute(attributes.READONLY)
    ) ? ' disabled' : '';
    const labelHtml = this.labelHidden ? '<span></span>' : (
      `<label
        ${ buildClassAttrib('ids-label-text', this.disabled && 'disabled') }
        part="label"
        for="${this.id}-input-input"
      >
        <ids-text label ${disabledAttribHtml}>${this.label}</ids-text>
      </label>`
    );
    return (
      `<div
        ${buildClassAttrib(
        'ids-spinbox',
        this.hasAttribute(attributes.DISABLED) && 'disabled',
        this.hasAttribute(attributes.READONLY) && 'readonly'
      ) }
        part="container">
          ${labelHtml}
          <div class="ids-spinbox-content">
            <ids-button
              type="tertiary"
              part="button"
              tabindex="-1"
              ${buttonDisabledAttribHtml}
            ><ids-text
              label
              font-size="16"
              font-weight="bold"
              ${buttonDisabledAttribHtml}
            >-</ids-text>
            </ids-button>
            <ids-input
              text-align="center"
              value=${this.value}
              id="${this.id}-input"
              label="${this.label}"
              label-hidden="true"
              ${this.placeholder ? ` placeholder="${this.placeholder}"` : ''}
              ${disabledAttribHtml}
              part="input"
            ></ids-input>
            <ids-button
              type="tertiary"
              part="button"
              tabindex="-1"
              ${buttonDisabledAttribHtml}
            ><ids-text
              label
              font-size="16"
              font-weight="bold"
              ${buttonDisabledAttribHtml}
            >+</ids-text>
            </ids-button>
          </div>
          ${this.validate ? '<div class="validation-message" part="validation"></div>' : ''}
      </div>`
    );
  }
template ( ) { if ( ! this . id ) { this . setAttribute ( attributes . ID , ` ${ ++ instanceCounter } ` ) ; } const disabledAttribHtml = this . hasAttribute ( attributes . DISABLED ) ? ' disabled' : '' ; const buttonDisabledAttribHtml = ( this . hasAttribute ( attributes . DISABLED ) || this . hasAttribute ( attributes . READONLY ) ) ? ' disabled' : '' ; const labelHtml = this . labelHidden ? '<span></span>' : ( ` ${ buildClassAttrib ( 'ids-label-text' , this . disabled && 'disabled' ) } ${ this . id } ${ disabledAttribHtml } ${ this . label } ` ) ; return ( ` ${ buildClassAttrib ( 'ids-spinbox' , this . hasAttribute ( attributes . DISABLED ) && 'disabled' , this . hasAttribute ( attributes . READONLY ) && 'readonly' ) } ${ labelHtml } ${ buttonDisabledAttribHtml } ${ buttonDisabledAttribHtml } ${ this . value } ${ this . id } ${ this . label } ${ this . placeholder ? ` ${ this . placeholder } ` : '' } ${ disabledAttribHtml } ${ buttonDisabledAttribHtml } ${ buttonDisabledAttribHtml } ${ this . validate ? '<div class="validation-message" part="validation"></div>' : '' } ` ) ; }
Create the Template for the contents
 @returns {string} the template to render
Create the Template for the contents @returns { string } the template to render