{{#modal-dialog action=(route-action "closeModal")}}
  <div class='card' id='upload_form_container'>
    <div class='text-content'>
      {{#if isYoutubeExportingDisabled}}
        <div class='item single-item'>
          Our exporter is over capacity right now. We'll be back soon. Follow <a href='https://twitter.com/TwitchSupport'>@TwitchSupport</a> on Twitter for updates and assistance.
        </div>
        <div class='buttons'>
          <button {{action (route-action "closeModal")}} class='button'>
            <span>Close</span>
          </button>
        </div>
      {{else}}
        <div class='content-header'>
          <h4>Export to YouTube</h4>
        </div>
        <div class='error subwindow_notice' id='upload_error_message' style='display:none'></div>
        <form>
          <div class='item'>
            <label for='title'>
              Title
            </label>
            {{input name="title" class="text"}}
          </div>
          <div class='item'>
            <label for='description'>
              Description
            </label>
            {{textarea name="description" value=video.description class="description"}}
          </div>
          <div class='item'>
            <label for='tag_list'>
              Tags
            </label>
            {{input name="tag_list" class="text"}}
          </div>
          <div class='item'>
            <label for='private'>
              Privacy
            </label>
            <select id="private" name="private">
              <option value="false">Public</option>
              <option value="true">Unlisted</option>
            </select>
          </div>
          {{#if showSplitVideoCheckbox}}
            <div class='item'>
              <label for='do_split'>
                Split the video in to 15min segments
              </label>
              <div class='boolean'>
                <select id="do_split" name="do_split">
                  <option value="false">No</option>
                  <option value="true">Yes</option>
                </select>
              </div>
              <p class='form_microcopy'>15 minutes is the maximum allowed upload length for non-verified YouTube accounts. The export may fail if your YouTube account is not verified.</p>
            </div>
          {{/if}}
          {{#unless video.liveAnnotationsEnabled}}
            <div class='item'>
              <label class='optional'>Did you know?</label>
              <div class='upsell'>
                <img class='upsell-img' src='/images/xarth/youtube_annot/88x60.png'>
                <div class='upsell-desc'>
                  <p class='form_microcopy'>
                    {{#with (i18n-split-string "You can turn on YouTube Live Annotations to automatically notify your YouTube viewers when you are live on Twitch in your |account settings.|") as |translation|}}
                      {{at-index translation 0}}
                      <a href="/settings/connections" target="_blank" rel="noopener noreferrer">{{at-index translation 1}}</a>
                      {{at-index translation 2}}
                    {{/with}}
                  </p>
                </div>
              </div>
            </div>
          {{/unless}}
        </form>
        <div class='buttons'>
          <button {{action (route-action "closeModal")}} class='button button--text'>
            <span>Cancel</span>
          </button>
          <button {{action "uploadVideo" }} class='button'>
            <span>Export</span>
          </button>
        </div>
      {{/if}}
    </div>
  </div>
{{/modal-dialog}}
