{{#conditional-loading-spinner condition=loading}}
  {{#if errorMessage}}
    <div class="control-group">
      <div class="controls">
        <div class="alert alert-error">{{errorMessage}}</div>
      </div>
    </div>
  {{/if}}

  <div class="control-group bookmark-name-wrap">
    {{input id="bookmark-name" value=model.name name="bookmark-name" class="bookmark-name" enter=(action "saveAndClose") placeholder=(i18n "post.bookmarks.name_placeholder") maxlength="100"}}
    {{d-button icon="cog" action=(action "toggleOptionsPanel") class="bookmark-options-button"}}
  </div>

  <div class="bookmark-options-panel">
    <label class="control-label" for="bookmark_auto_delete_preference">{{i18n "bookmarks.auto_delete_preference.label"}}</label>
    {{combo-box
    content=autoDeletePreferences
    value=autoDeletePreference
    class="bookmark-option-selector"
    onChange=(action (mut autoDeletePreference))
    }}
  </div>

  {{#if showExistingReminderAt }}
    <div class="alert alert-info existing-reminder-at-alert">
      {{d-icon "far-clock"}}
      <span>{{i18n "bookmarks.reminders.existing_reminder" at_date_time=existingReminderAtFormatted}}</span>
    </div>
  {{/if}}

  <div class="control-group">
    <label class="control-label">
      {{i18n "post.bookmarks.set_reminder"}}
    </label>

    {{#if userHasTimezoneSet}}
      {{time-shortcut-picker
        prefilledDatetime=prefilledDatetime
        onTimeSelected=(action "onTimeSelected")
        customOptions=customTimeShortcutOptions
        additionalOptionsToShow=additionalTimeShortcutOptions
        mousetrap=_mousetrap
      }}
    {{else}}
      <div class="alert alert-info">{{html-safe (i18n "bookmarks.no_timezone" basePath=(base-path))}}</div>
    {{/if}}
  </div>

  <div class="control-group">
    {{d-button id="save-bookmark" label="bookmarks.save" class="btn-primary" action=(action "saveAndClose")}}
    {{d-modal-cancel close=(action "closeWithoutSavingBookmark")}}
    {{#if showDelete}}
      <div class="pull-right">
        {{d-button id="delete-bookmark" icon="trash-alt" class="btn-danger" action=(action "delete")}}
      </div>
    {{/if}}
  </div>
{{/conditional-loading-spinner}}
