<!-- Label -->
<div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item label-filter">
	<span class="text">
		{{ctx.Locale.Tr "repo.issues.filter_label"}}
	</span>
	{{svg "octicon-triangle-down" 14 "dropdown icon"}}
	<div class="menu">
		<div class="ui icon search input">
			<i class="icon">{{svg "octicon-search" 16}}</i>
			<input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_label"}}">
		</div>
		<div class="ui checkbox compact archived-label-filter">
			<input name="archived" type="checkbox"
				id="archived-filter-checkbox"
				{{if .ShowArchivedLabels}}checked{{end}}
			>
			<label for="archived-filter-checkbox">
				{{ctx.Locale.Tr "repo.issues.label_archived_filter"}}
				<i class="tw-ml-1" data-tooltip-content={{ctx.Locale.Tr "repo.issues.label_archive_tooltip"}}>
					{{svg "octicon-info"}}
				</i>
			</label>
		</div>
		<span class="info">{{ctx.Locale.Tr "repo.issues.filter_label_exclude"}}</span>
		<div class="divider"></div>
		<a rel="nofollow" class="{{if .AllLabels}}active selected {{end}}item" href="?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels=&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}&fuzzy={{$.IsFuzzy}}{{if $.ShowArchivedLabels}}&archived=true{{end}}">{{ctx.Locale.Tr "repo.issues.filter_label_no_select"}}</a>
		<a rel="nofollow" class="{{if .NoLabel}}active selected {{end}}item" href="?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels=0&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}&fuzzy={{$.IsFuzzy}}{{if $.ShowArchivedLabels}}&archived=true{{end}}">{{ctx.Locale.Tr "repo.issues.filter_label_select_no_label"}}</a>
		{{$previousExclusiveScope := "_no_scope"}}
		{{range .Labels}}
			{{$exclusiveScope := .ExclusiveScope}}
			{{if and (ne $previousExclusiveScope $exclusiveScope)}}
				<div class="divider"></div>
			{{end}}
			{{$previousExclusiveScope = $exclusiveScope}}
			<a rel="nofollow" class="item label-filter-item tw-flex tw-items-center" {{if .IsArchived}}data-is-archived{{end}} href="?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&labels={{.QueryString}}&state={{$.State}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}&fuzzy={{$.IsFuzzy}}{{if $.ShowArchivedLabels}}&archived=true{{end}}" data-label-id="{{.ID}}">
				{{if .IsExcluded}}
					{{svg "octicon-circle-slash"}}
				{{else if .IsSelected}}
					{{if $exclusiveScope}}
						{{svg "octicon-dot-fill"}}
					{{else}}
						{{svg "octicon-check"}}
					{{end}}
				{{end}}
				{{RenderLabel $.Context ctx.Locale .}}
				<p class="tw-ml-auto">{{template "repo/issue/labels/label_archived" .}}</p>
			</a>
		{{end}}
	</div>
</div>
