{{if .Linked}}
<p><strong>To unlink:</strong></p>
<ol class="link-instructions">
	<li>Open Signal on your phone</li>
	<li>Go to Settings → Linked Devices</li>
	<li>Find and remove this device</li>
</ol>
{{else}}
	{{if .Error}}
<p class="channel-not-configured">{{.Error}}</p>
	{{else}}
<button class="btn-primary" data-action="link-signal">Link</button>
<div id="signal-qr-container" class="qr-container" style="display:none;">
	<p><strong>Scan this QR code with Signal:</strong></p>
	<ol class="link-instructions">
		<li>Open Signal on your phone</li>
		<li>Go to Settings → Linked Devices</li>
		<li>Tap "+" or "Link New Device"</li>
		<li>Scan the QR code below</li>
	</ol>
	<div class="qr-code-wrapper">
		<img id="signal-qr-code" alt="QR code — scan with Signal to link this device" width="400" height="400">
	</div>
</div>
	{{end}}
{{end}}
