<section id="worktrees-view" class="section--settings section--collapsible" tabindex="-1">
	<div class="section__header">
		<h2>
			Worktrees view&nbsp;<gl-feature-badge></gl-feature-badge>
			<a
				class="link__learn-more"
				title="Learn more"
				href="https://help.gitkraken.com/gitlens/gitlens-plus/#worktrees"
			>
				<i class="icon icon__info"></i>
			</a>
		</h2>

		<p class="section__header-hint">
			Adds a
			<a class="command command--show-view" title="Show View in Side Bar" href="command:gitlens.showWorktreesView"
				>Worktrees view</a
			>
			to visualize, explore, and manage Git worktrees
		</p>
	</div>

	<div class="section__collapsible">
		<div class="section__group">
			<div class="section__content">
				<div class="settings settings--fixed ml-1">
					<div class="setting">
						<div class="setting__input">
							<input
								id="worktrees.promptForLocation"
								name="worktrees.promptForLocation"
								type="checkbox"
								data-setting
							/>
							<label for="worktrees.promptForLocation">Always ask where to put new worktrees</label>
						</div>
					</div>

					<div class="setting">
						<div class="setting__input">
							<label for="worktrees.defaultLocation">Default&nbsp;worktree&nbsp;location</label>
							<input
								id="worktrees.defaultLocation"
								name="worktrees.defaultLocation"
								type="text"
								placeholder="absolute path to put new worktrees into"
								data-setting
							/>
						</div>
						<p class="setting__hint">
							<i class="icon icon__info"></i> Can be configured on a per-workspace or per-folder basis
						</p>
					</div>

					<div class="setting">
						<div class="setting__input">
							<input
								id="views.worktrees.showBranchComparison"
								name="views.worktrees.showBranchComparison"
								type="checkbox"
								value="branch"
								data-setting
							/>
							<label for="views.worktrees.showBranchComparison"
								>Show a comparison of the worktree branch with a user-selected reference (branch, tag,
								etc)
							</label>
						</div>
					</div>

					<div class="section__group">
						<div class="section__content">
							<div class="settings settings--fixed">
								<div class="setting">
									<div class="setting__input">
										<input
											id="views.worktrees.pullRequests.enabled"
											name="views.worktrees.pullRequests.enabled"
											type="checkbox"
											data-setting
										/>
										<label for="views.worktrees.pullRequests.enabled"
											>Show associated pull requests</label
										>
									</div>
									<p class="setting__hint">
										Requires a connection to a supported remote service (e.g. GitHub)
									</p>
								</div>

								<div class="settings settings--fixed ml-2">
									<div class="setting" data-enablement="views.worktrees.pullRequests.enabled">
										<div class="setting__input">
											<input
												id="views.worktrees.pullRequests.showForBranches"
												name="views.worktrees.pullRequests.showForBranches"
												type="checkbox"
												data-setting
												disabled
											/>
											<label for="views.worktrees.pullRequests.showForBranches"
												>Show the pull request associated with the worktree branch</label
											>
										</div>
									</div>

									<div class="setting" data-enablement="views.worktrees.pullRequests.enabled">
										<div class="setting__input">
											<input
												id="views.worktrees.pullRequests.showForCommits"
												name="views.worktrees.pullRequests.showForCommits"
												type="checkbox"
												data-setting
												disabled
											/>
											<label for="views.worktrees.pullRequests.showForCommits"
												>Show the pull request that introduced each commit</label
											>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>

					<div class="setting">
						<div class="setting__input">
							<label for="views.worktrees.files.layout">Layout files</label>
							<div class="select-container">
								<select
									id="views.worktrees.files.layout"
									name="views.worktrees.files.layout"
									data-setting
								>
									<option value="auto">automatically</option>
									<option value="list">as a list</option>
									<option value="tree">as a tree</option>
								</select>
							</div>
						</div>
						<p class="setting__hint" data-visibility="views.worktrees.files.layout =auto">
							Chooses the best layout based on the number of files at each nesting level
						</p>
					</div>

					<div class="setting">
						<div class="setting__input">
							<label for="views.worktrees.files.icon">File icons</label>
							<div class="select-container">
								<select id="views.worktrees.files.icon" name="views.worktrees.files.icon" data-setting>
									<option value="type">show file type (default)</option>
									<option value="status">show file status</option>
								</select>
							</div>
						</div>
					</div>

					<div class="setting">
						<div class="setting__input">
							<input
								id="views.worktrees.files.compact"
								name="views.worktrees.files.compact"
								type="checkbox"
								data-setting
							/>
							<label for="views.worktrees.files.compact">Use compact file layout</label>
						</div>
						<p class="setting__hint">Compacts (flattens) unnecessary nesting when using a tree layouts</p>
					</div>

					<div class="setting">
						<div class="setting__input">
							<input
								id="views.worktrees.avatars"
								name="views.worktrees.avatars"
								type="checkbox"
								data-setting
							/>
							<label for="views.worktrees.avatars">Use author avatars</label>
						</div>
					</div>
				</div>
			</div>

			<div class="section__preview">
				<img
					class="image__preview hidden"
					src="#{webroot}/media/worktrees-view-compare+pr.webp"
					data-visibility="views.worktrees.showBranchComparison !false &amp; views.worktrees.pullRequests.enabled &amp; views.worktrees.pullRequests.showForBranches"
					loading="lazy"
					width="600"
					height="360"
				/>
				<img
					class="image__preview hidden"
					src="#{webroot}/media/worktrees-view-compare.webp"
					data-visibility="views.worktrees.showBranchComparison !false &amp; views.worktrees.pullRequests.enabled =false"
					loading="lazy"
					width="600"
					height="360"
				/>
				<img
					class="image__preview hidden"
					src="#{webroot}/media/worktrees-view-compare.webp"
					data-visibility="views.worktrees.showBranchComparison !false &amp; views.worktrees.pullRequests.enabled &amp; views.worktrees.pullRequests.showForBranches =false"
					loading="lazy"
					width="600"
					height="360"
				/>
				<img
					class="image__preview hidden"
					src="#{webroot}/media/worktrees-view-pr.webp"
					data-visibility="views.worktrees.showBranchComparison =false &amp; views.worktrees.pullRequests.enabled &amp; views.worktrees.pullRequests.showForBranches"
					loading="lazy"
					width="600"
					height="360"
				/>
				<img
					class="image__preview hidden"
					src="#{webroot}/media/worktrees-view.webp"
					data-visibility="views.worktrees.showBranchComparison =false &amp; views.worktrees.pullRequests.enabled =false"
					loading="lazy"
					width="600"
					height="360"
				/>
				<img
					class="image__preview hidden"
					src="#{webroot}/media/worktrees-view.webp"
					data-visibility="views.worktrees.showBranchComparison =false &amp; views.worktrees.pullRequests.enabled &amp; views.worktrees.pullRequests.showForBranches =false"
					loading="lazy"
					width="600"
					height="360"
				/>
			</div>
		</div>

		<div class="section__group">
			<p class="section__hint">
				<i class="icon icon__info"></i> For more options, open the
				<a
					class="secondary"
					title="Open Settings UI"
					href="command:workbench.action.openSettings?%22gitlens.views.worktrees%22"
					>Settings UI</a
				>
				and search for <b><i>gitlens.views.worktrees</i></b> or
				<b><i>gitlens.views</i></b>
			</p>
		</div>
	</div>
</section>
