{% if user %}
<form class="comment-form" method="POST" action="/comments/create">
    <input type="hidden" name="target_uid" value="{{ _comment_target_uid }}">
    <input type="hidden" name="target_type" value="{{ _comment_target_type }}">
    {% set _user = user %}{% set _size = 32 %}{% set _size_class = "sm" %}{% include "_avatar_link.html" %}
    <textarea name="content" placeholder="Your opinion goes here..." required aria-required="true" aria-label="Comment" maxlength="125000" class="emoji-picker-target" data-mention></textarea>
    <div class="comment-form-actions">
        <dp-upload multiple paste
            max-size="{{ max_upload_size_mb() }}"
            max-files="{{ max_attachments_per_resource() }}"
            allowed-types="{{ allowed_file_types() }}"></dp-upload>
        <button type="submit" class="comment-form-submit"><span class="icon">&#x1F4E4;</span><span class="label"> Post</span></button>
    </div>
</form>
{% else %}
<form class="comment-form comment-form-guest">
    <textarea name="content" placeholder="Your opinion goes here..." disabled aria-disabled="true" aria-label="Comment"></textarea>
    <div class="comment-form-actions">
        <button type="button" class="comment-form-submit" disabled aria-disabled="true"><span class="icon">&#x1F4E4;</span><span class="label"> Post</span></button>
    </div>
</form>
{% endif %}
