{{#d-modal-body id="bookmark-reminder-modal"}}
  {{#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">
      <label class="control-label" for="name">
        {{i18n 'post.bookmarks.name'}}
      </label>

      {{input value=name name="name" class="bookmark-name" enter=(action "saveAndClose") placeholder=(i18n "post.bookmarks.name_placeholder")}}
    </div>

    {{#if showBookmarkReminderControls}}
    <div class="control-group">
      <label class="control-label" for="set_reminder">
        {{i18n 'post.bookmarks.set_reminder'}}
      </label>

      {{#if userHasTimezoneSet}}
        {{#tap-tile-grid activeTile=selectedReminderType as |grid|}}
          {{#if usingMobileDevice}}
            <!-- {{tap-tile icon="desktop" text=(i18n "bookmarks.reminders.at_desktop") tileId=reminderTypes.AT_DESKTOP activeTile=grid.activeTile onChange=(action "selectReminderType")}} -->
          {{/if}}

          {{#if showLaterToday}}
            {{tap-tile icon="far-moon" text=laterTodayFormatted tileId=reminderTypes.LATER_TODAY activeTile=grid.activeTile onChange=(action "selectReminderType")}}
          {{/if}}
          {{tap-tile icon="briefcase" text=nextBusinessDayFormatted tileId=reminderTypes.NEXT_BUSINESS_DAY activeTile=grid.activeTile onChange=(action "selectReminderType")}}
          {{tap-tile icon="far-sun" text=tomorrowFormatted tileId=reminderTypes.TOMORROW activeTile=grid.activeTile onChange=(action "selectReminderType")}}
          {{tap-tile icon="far-clock" text=nextWeekFormatted tileId=reminderTypes.NEXT_WEEK activeTile=grid.activeTile onChange=(action "selectReminderType")}}
          {{tap-tile icon="far-calendar-plus" text=nextMonthFormatted tileId=reminderTypes.NEXT_MONTH activeTile=grid.activeTile onChange=(action "selectReminderType")}}
          <!-- {{tap-tile icon="calendar-alt" text=(I18n "bookmarks.reminders.custom") tileId=reminderTypes.CUSTOM activeTile=grid.activeTile onChange=(action "selectReminderType")}} -->
        {{/tap-tile-grid}}
      {{else}}
        <div class="alert alert-info">{{{i18n "bookmarks.no_timezone" basePath=basePath }}}</div>
      {{/if}}
    </div>
    {{/if}}

    <div class="control-group">
      {{d-button label="bookmarks.save" class="btn-primary" action=(action "saveAndClose")}}
      {{d-modal-cancel close=(action "closeWithoutSavingBookmark")}}      
    </div>
  {{/conditional-loading-spinner}}
{{/d-modal-body}}
