{{define "client-updates"}} {{if .ClientUpdates}}
<div class="space-y-3">
	{{range .ClientUpdates}} {{if .UpdateAvailable}}
	<div class="bg-gray-700 rounded-lg p-4 flex items-center justify-between">
		<div class="flex items-center gap-3">
			<img
				src="/static/logos/{{.Logo}}"
				class="w-8 h-8"
				alt="{{.AppName}}"
			/>
			<div>
				<h4 class="font-semibold text-white">{{.AppName}}</h4>
				{{if .PackageManager}}
				<p class="text-gray-400 text-sm">
					Current: {{cleanAppVersion .CurrentVersion}}
					({{.PackageManager}}) → Available: {{cleanAppVersion
					.AvailableVersion}}
				</p>
				{{else}}
				<p class="text-gray-400 text-sm">
					Current: {{cleanAppVersion .CurrentVersion}} → Available:
					{{cleanAppVersion .AvailableVersion}}
				</p>
				{{end}}
			</div>
		</div>
		<button
			data-install
			data-method-id="{{.MethodID}}"
			data-is-update="true"
			class="bg-purple-600 hover:bg-purple-700 text-white px-4 py-2 rounded transition flex items-center gap-2"
		>
			<i class="bx bx-archive-arrow-down"></i>
			Install Update
		</button>
	</div>
	{{end}} {{end}}
</div>
{{else}}
<div class="text-center py-8">
	<i class="bx bx-check-circle text-4xl text-green-400"></i>
	<p class="text-gray-400 mt-2">No Updates Available</p>
	<p class="text-gray-500 text-sm">
		Click "Check for Updates" to see if any updates are available
	</p>
</div>
{{end}} {{end}}
