{{#modal-dialog size='medium' action='closeModal' didOpen='didOpen'}}
  <div class='card' data-test-video-edit-modal>
    <div class='text-content'>
      <div class='content-header'>
        <h4>{{i18n 'Edit Video Information'}}</h4>
      </div>
      <div class="tower tower--bleed tower--gutter-xs">
        <div class="{{unless errorMessage 'hidden'}} subwindow_notice">
          {{errorMessage}}
        </div>
        <div class="col-md-7">
          <form>
            <div class='item'>
              <label>{{i18n 'Thumbnail'}}</label>
              <div class='modal__thumbnail modal__thumbnail--main'>
                {{#unless content.file}}
                  <img src={{selectedThumbnailSrc}}>
                {{/unless}}
              </div>
            </div>
            <div class='item'>
              <label>{{t 'general.forms.title'}}</label>
              {{input name='title' value=content.title class='text content-title'}}
            </div>
            <div class='item'>
              <label>{{t 'general.forms.description'}}</label>
              {{textarea name='descriptionMarkdown' value=content.descriptionMarkdown}}
              <p class="vod-desc-hints hint align-right">
                <span class="strong">{{i18n '**bold**'}}</span>
                <span class="italic">{{i18n '*italics*'}}</span>
                <span class="vod-desc-hints__link">{{i18n '[link](http://)'}}</span>
              </p>
            </div>
            <div class='item select_game'>
              <label>{{i18n 'Game'}}</label>
              {{playing-toggle game=content.game showPlayToggle=false onGameChange=(action 'onGameChange')}}
            </div>
            <div class='item'>
              <label>
                {{i18n 'Tags'}}
                <span class='sub-text small'>{{i18n 'separate with commas'}}</span>
              </label>
              {{input name='tag_list' value=content.tag_list class='text'}}
            </div>
          </form>
        </div>
        <div class="col-md-5">
          <label>{{i18n 'Select Thumbnail'}}</label>
          {{#each content.thumbnails.medium as |thumbnail index|}}
            {{#if (eq thumbnail.type 'generated')}}
              <div {{action 'selectThumbnail' index }} class="modal__thumbnail modal__thumbnail--small">
                <div class="modal__thumbnail-img">
                  <img src="{{thumbnail.url}}">
                </div>
                {{#if (eq thumbnailIndex index)}}
                  <div class="modal__thumbnail-selected">
                  </div>
                {{else}}
                  <div class="modal__thumbnail-setthumb">
                    {{i18n 'Set Thumbnail'}}
                  </div>
                {{/if}}
              </div>
            {{/if}}
          {{/each}}
          {{#if showUploadedSection}}
            <div {{action 'selectThumbnail' customThumbnail.index}} class="modal__thumbnail modal__thumbnail--small">
              <div class="modal__thumbnail-img">
                <img src="{{customThumbnail.url}}">
              </div>
              {{#if (eq thumbnailIndex customThumbnail.index) }}
                <div class="modal__thumbnail-selected">
                </div>
              {{else}}
                <div class="modal__thumbnail-setthumb">
                  {{i18n 'Set Thumbnail'}}
                </div>
              {{/if}}
            </div>
            <button class="button button--hollow modal__thumbnail-remove" {{action 'deleteOldCustomThumbnail'}}>{{i18n 'Remove thumbnail'}}</button>
          {{/if}}
          <div class="modal__thumbnail-upload">
            <form action="{{thumbnailUploadHref}}">
              <label>{{i18n 'Upload a Custom Thumbnail'}}</label>
              {{#if content.file}}
                <button class="button button--text" {{action 'resetUpload'}}>{{i18n 'Cancel upload'}}</button>
              {{/if}}
              {{video/manager-thumbnail-upload content=content imageUploaded='imageUploaded'}}
            </form>
          </div>
        </div>
      </div>
      <div class='buttons'>
        <a {{action 'closeModal'}} class="js-subwindow-close button button--text">
          <span>{{t 'general.forms.cancel'}}</span>
        </a>
        <button disabled="{{currentlySaving}}" {{action "update" }} class='js-subwindow-submit button' type='submit'>
          <span>{{t 'general.forms.done'}}</span>
        </button>
      </div>
    </div>
  </div>
{{/modal-dialog}}
