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

interface Props {
	onDiscard: () => void;
}

let { onDiscard }: Props = $props();
</script>

<div
	class="mb-5 flex items-center justify-between rounded border border-amber-200 bg-amber-50 p-3 text-sm text-amber-800 dark:border-amber-800 dark:bg-amber-950/40 dark:text-amber-300"
>
	<span>{m.admin_unsaved_warning()}</span>
	<button
		type="button"
		onclick={onDiscard}
		class="ml-4 shrink-0 font-sans text-xs font-bold tracking-widest text-amber-800 uppercase hover:text-amber-900 dark:text-amber-300"
	>
		{m.person_discard_changes()}
	</button>
</div>
