title: $:/plugins/linonetwo/tw-calendar/calendar-widget/tiddlywiki-ui/popup/EventPreview

\whitespace trim
\import [subfilter{$:/core/config/GlobalImportFilter}]

<div class="tw-calendar-layout-event-preview-container">
<$vars storyTiddler=<<currentTiddler>> tiddlerInfoState=<<qualify "$:/state/popup/tiddler-info">>>
  <div
    data-tiddler-title=<<currentTiddler>>
    data-tags={{!!tags}}
    class={{{ tc-tiddler-exists tc-tiddler-frame tc-tiddler-view-frame [{!!class}] +[join[ ]] }}}
    role="article"
  >
    <!-- Top buttons: open in story river / close -->
    {{||$:/plugins/linonetwo/tw-calendar/calendar-widget/tiddlywiki-ui/popup/EventPreview/TopButtons}}

    <!-- Title input: same style as create popup, editing actual tiddler caption -->
    <div class="tw-calendar-layout-form-group tw-calendar-layout-form-title">
      <$edit-text
        field="caption"
        tag="input"
        class="tc-titlebar tc-edit-texteditor tw-calendar-caption-input"
        tabindex=1
        focus={{{ [{$:/config/AutoFocus}match[title]then[true]] ~[[false]] }}}
        cancelPopups="yes"
        fileDrop=no
        inputmode="text"
        autocomplete="off"
      />
    </div>

    <!-- Body text: reuse create popup component -->
    {{||$:/plugins/linonetwo/tw-calendar/calendar-widget/tiddlywiki-ui/popup/CreateNewTiddlerPopup/components/Text}}

    <!-- Tags: reuse create popup component -->
    {{||$:/plugins/linonetwo/tw-calendar/calendar-widget/tiddlywiki-ui/popup/CreateNewTiddlerPopup/components/Tags}}

    <!-- Time range: reuse create popup component -->
    {{||$:/plugins/linonetwo/tw-calendar/calendar-widget/tiddlywiki-ui/popup/CreateNewTiddlerPopup/components/Time}}

    <!-- Recurrence and Alarms: reuse create popup component (expanded by default in preview) -->
    {{||$:/plugins/linonetwo/tw-calendar/calendar-widget/tiddlywiki-ui/popup/EditRecurrence}}

    <!-- More Settings: reuse create popup component (collapsed by default) -->
    {{||$:/plugins/linonetwo/tw-calendar/calendar-widget/tiddlywiki-ui/popup/CreateNewTiddlerPopup/components/MoreSettings}}

    <!-- Bottom buttons: delete -->
    <div class="tw-calendar-layout-event-preview-bottom-buttons">
      <$button tooltip={{$:/language/Buttons/Delete/Hint}} aria-label={{$:/language/Buttons/Delete/Caption}} class="tw-calendar-layout-event-preview-close-button">
        <$text text={{$:/language/Buttons/Delete/Caption}}/> {{$:/core/images/delete-button}}
        <$action-sendmessage $message="tm-delete-tiddler" param=<<currentTiddler>>/>
      </$button>
    </div>

    <!-- Extension point for plugins -->
    <$list filter="[all[shadows+tiddlers]tag[$:/tw-calendar/EventPreviewMiniViewTemplate]!is[draft]]" variable="listItem">
      <$transclude tiddler=<<listItem>>/>
    </$list>
  </div>
</$vars>

</div>
