{{ define "repo/pulls/fragments/pullPatchUpload" }}
    <div id="patch-upload">
        <div class="flex items-center justify-between gap-2">
            <p class="my-0">
                You can paste a <code>git diff</code> or a
                <code>git format-patch</code> patch series here.
            </p>
            <span id="patch-spinner" class="group">
                {{ i "loader-circle" "size-4 animate-spin hidden group-[.htmx-request]:inline text-gray-500 dark:text-gray-400" }}
            </span>
        </div>
        <textarea
            hx-trigger="paste delay:100ms, change"
            hx-post="/{{ .RepoInfo.FullName }}/pulls/new/refresh"
            hx-include="closest form"
            hx-target="#pr-compose-host"
            hx-swap="outerHTML"
            hx-indicator="#patch-spinner"
            name="patch"
            id="patch"
            rows="12"
            class="w-full mt-2 resize-y font-mono dark:bg-gray-800 dark:text-white dark:border-gray-700"
            placeholder="diff --git a/file.txt b/file.txt
index 1234567..abcdefg 100644
--- a/file.txt
+++ b/file.txt"
        >{{ .Patch }}</textarea>
    </div>
{{ end }}
