{{define "formtabler_iconinput"}}
<div class="mb-3">
  <label class="form-label">{{defaultVal "Icon input" .Label}}</label>
  <div class="input-icon{{if .Loader}} input-icon-loading{{end}}">
    {{if .Prepend}}<span class="input-icon-addon">
      {{if .Loader}}
      <div class="spinner-border spinner-border-sm text-secondary" role="status"></div>
      {{else}}
      <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon">{{if eq .Icon "user"}}<path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"></path><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path>{{else}}<path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"></path><path d="M21 21l-6 -6"></path>{{end}}</svg>
      {{end}}
    </span>{{end}}
    <input type="text" class="form-control" placeholder="{{defaultVal "Search for…" .Placeholder}}">
    {{if not .Prepend}}<span class="input-icon-addon">
      {{if .Loader}}
      <div class="spinner-border spinner-border-sm text-secondary" role="status"></div>
      {{else}}
      <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"></path><path d="M21 21l-6 -6"></path></svg>
      {{end}}
    </span>{{end}}
  </div>
</div>
{{end}}
