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

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

<div
	class="mt-6 flex items-center justify-between rounded-sm border border-line bg-surface px-6 py-4 shadow-sm"
>
	<a href={discardHref} class="text-sm font-medium text-ink-2 transition-colors hover:text-ink">
		{m.person_discard_changes()}
	</a>
	<button
		type="submit"
		form={formId}
		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>
