{{ define "repo/fragments/compareAllowPull" }}
    <div
        class="flex items-baseline justify-normal gap-4"
        id="allow-pull"
        hx-oob-swap="true"
    >
        <p>
            This comparison can be turned into a pull request to be reviewed and
            discussed.
        </p>

        {{ $newPullUrl := printf "/%s/pulls/new?source=branch&sourceBranch=%s&targetBranch=%s" .RepoInfo.FullName (urlquery .Head) (urlquery .Base) }}


        <div class="flex justify-start items-center gap-2 mt-2">
            <a
                href="{{ $newPullUrl }}"
                class="btn flex items-center gap-2 no-underline hover:no-underline"
            >
                {{ i "git-pull-request-create" "w-4 h-4" }}
                create pull
                <span id="create-pull-spinner" class="group">
                    {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }}
                </span>
            </a>
        </div>
    </div>
{{ end }}
