<script lang="ts">
import { m } from '$lib/paraglide/messages.js';

let { discardHref }: { discardHref: string } = $props();
</script>

<!-- Sticky full-bleed save bar -->
<div
	class="sticky bottom-0 z-10 -mx-4 flex items-center justify-between border-t border-line bg-surface px-6 py-4 shadow-[0_-2px_8px_rgba(0,0,0,0.06)]"
>
	<a href={discardHref} class="text-sm font-medium text-ink-2 transition-colors hover:text-ink">
		{m.person_discard_changes()}
	</a>
	<button
		type="submit"
		formaction="?/update"
		class="rounded bg-primary px-6 py-2 text-sm font-bold tracking-widest text-primary-fg uppercase transition-colors hover:bg-primary/80"
	>
		{m.person_save_changes()}
	</button>
</div>
