{{ if $.Param "enableTocSwitch" }}
  <label class="switch switch__rel">
    {{ if ($.Param "wideViewAsDefault") }}
      <input id="toggle-sidebar" aria-label="Toggle Sidebar Visibility" type="checkbox" />
      <span class="slider">
        <span class="slider__icon {{ if (ne ($.Param "languagedir") "rtl") }}{{ else }}hide{{ end }}">
          {{ partial "svgs/arrow-back.svg" (dict "width" 20 "height" 20) }}
        </span>
        <span class="slider__icon {{ if (ne ($.Param "languagedir") "rtl") }}hide{{ end }}">
          {{ partial "svgs/arrow-forward.svg" (dict "width" 20 "height" 20) }}
        </span>
      </span>
    {{ else }}
      <input id="toggle-sidebar" aria-label="Toggle Sidebar Visibility" type="checkbox" checked />
      <span class="slider">
        <span class="slider__icon {{ if (ne ($.Param "languagedir") "rtl") }}{{ else }}hide{{ end }}">
          {{ partial "svgs/arrow-forward.svg" (dict "width" 20 "height" 20) }}
        </span>
        <span class="slider__icon {{ if (ne ($.Param "languagedir") "rtl") }}hide{{ end }}">
          {{ partial "svgs/arrow-back.svg" (dict "width" 20 "height" 20) }}
        </span>
      </span>
    {{ end }}
    
  </label>
{{ end }}