{{#if title}}
  <section class="header clearfix">
    <div class="right-buttons">
      {{#if showCopy}}
        {{copy-to-clipboard
          tooltipText=""
          buttonText="copyToClipboard.tooltip"
          clipboardText=value
          class="with-clip"
        }}
      {{/if}}
      {{#if showUpload}}
        <button class="btn bg-link icon-btn" {{action "click"}}>
          <span class="darken"><i class="icon icon-upload text-small"/></span>
          <span>{{t "inputTextFile.tooltip"}}</span>
        </button>
      {{/if}}
      {{#if showDownload}}
        <button class="btn bg-link icon-btn p-0" {{action "download"}}>
          <span class="darken"><i class="icon icon-download text-small"/></span>
          <span>{{t "generic.download"}}</span>
        </button>
      {{/if}}
    </div>
    <h1>{{title}}</h1>
  </section>
{{else}}
  <div class="text-right mb-20">
    {{#if showCopy}}
      {{copy-to-clipboard
        tooltipText=""
        buttonText="copyToClipboard.tooltip"
        clipboardText=value
        class="with-clip"
      }}
    {{/if}}
    {{#if showUpload}}
      <button class="btn bg-link icon-btn" {{action "click"}}>
        <span class="darken"><i class="icon icon-upload text-small"/></span>
        <span>{{t "inputTextFile.tooltip"}}</span>
      </button>
    {{/if}}
    {{#if showDownload}}
      <button class="btn bg-link icon-btn p-0" {{action "download"}}>
        <span class="darken"><i class="icon icon-download text-small"/></span>
        <span>{{t "generic.download"}}</span>
      </button>
    {{/if}}
  </div>
{{/if}}

<div class="row">
  {{#if loading}}
    <section class="row">
      <div class="text-center">
        <i class="icon icon-spinner icon-spin icon-3x"></i>
      </div>
    </section>
  {{else}}
    <div class="col span-12 m-0 p-0 codemirror-container" style="overflow: auto;">
      {{ivy-codemirror
        placeholder=placeholder
        value=value
        valueUpdated=(if valueUpdated valueUpdated (action (mut value)) )
        options=(hash
          autofocus=true
          theme="monokai"
          tabSize=2
          lineNumbers=true
          mode="yaml"
          readOnly=(if (or (eq modalOpts.type "review") readOnly) true false)
          gutters=gutters
          lint=true
          lineWrapping=true
          viewportMargin=viewportMargin
          extraKeys=(hash
            Tab=tabReplacement
            Shift-Tab=shiftTabReplacement
          )
        )
      }}
    </div>
  {{/if}}
</div>
{{yield "description"}}
<input type="file" accept="{{actualAccept}}" multiple={{multiple}} class="hide">
