{% extends 'base.html' %}

{% block content %}
<form id="secret" method="POST">
  <div><textarea placeholder="Secret" name="rawData" maxlength="max_data_length" required autofocus></textarea></div>
  <div>
    <label>Expires after</label>
    <select name="expiration" >
      {% for n in range(24, max_expiration+24, 24) %}
      <option value="{{n}}" {% if n == (max_expiration+24)//2 %}selected{% endif %}>
        {{ (n//24)|int }} days
      </option>
      {% endfor %}
    </select>
  </div>
  <div>
    <label>Self-destructs after</label>
    <select name="reads">
      {% for n in range(1, max_reads+1) %}
      <option value="{{n}}" {% if n == (max_reads+1)//2 %}selected{% endif %}>
        {{ n }} reads
      </option>
      {% endfor %}
    </select>
  </div>
  <div><input type="submit" value="Send" disabled></div>
</form>
<form id="clipboard" method="POST" hidden>
  <div>
    <p>Hit [Ctrl]+[c] to copy</p>
    <input name="content" type="text">
  </div>
  <div><input type="submit" value="Copy link" disabled></div>
</form>

<script>
  (function() {
    setupCreate();
  })();
</script>
{% endblock %}
