{{define "page:content"}}
  <dialog id="dialog" class="share">
      <header>
          <h5><i class="bi bi-share-fill" title="Share"></i> Share item</h5>
          <span class="close-dialog button close"><i class='close-dialog bi bi-x-circle-fill'></i></span>
      </header>
      <div class="content">
          <form hx-post="/item/share/{{ .item.Id }}" hx-target="#message">
            <h5>{{ .item.Title }}</h5>
            <div class="row">
              <div class="col l6">
                <p style="margin-right: 6px">
                  <label for="share-start-datetime">Start date time</label>
                  <input name="start-datetime" id="share-start-datetime" type="datetime-local" value=""/>
                </p> 
              </div>
              <div class="col l6">
                <p>
                  <label for="share-end-datetime">End date time</label>
                  <input name="end-datetime" id="share-end-datetime" type="datetime-local" value=""/>
                </p> 
              </div>
            </div>
            <div class="row">
              <div class="col l12">
                <p style="margin-right: 6px">
                  <label for="share-token">Share Url</label>
                  <div class="input-container">
                    <span class="prefix">{{ .baseUrl }}/</span>
                    <input name="token" id="share-token" type="url" readonly="readonly" value="{{ .shareToken }}" />
                  </div>
                </p> 
              </div>
            </div>
            <div class="row">
              <div class="col l12">
                <p style="margin-right: 6px">
                  <label for="share-password">Password</label>
                  <input name="password" id="share-password" type="password" value=""/>
                </p> 
              </div>
            </div>
            <fieldset>
              <legend>Permissions</legend>
              <div class="row">
                <div class="col l6">{{ widget_checkbox "read" "Read" "1" "" }}</div>
                <div class="col l6">{{ widget_checkbox "edit" "Edit" "1" "" }}</div>
            </div>  
            </fieldset>
            <div id="footer-navbar">
              <button type="submit" class="main" title="Share"><i class='bi bi-share-fill'></i><span>Share</span></button>
            </div>
          </form>
    </div>
  </dialog>
  {{ end }}