31 lines
612 B
Svelte
31 lines
612 B
Svelte
<script lang="ts">
|
|
import { Button } from '$lib/components/ui/button';
|
|
import { Lock, LockOpen } from 'lucide-svelte';
|
|
import { languageStore } from '$lib/stores/language.svelte';
|
|
|
|
let {
|
|
unlocked = $bindable(false)
|
|
}: {
|
|
unlocked: boolean;
|
|
} = $props();
|
|
|
|
const t = $derived(languageStore.t);
|
|
|
|
function handleClick() {
|
|
unlocked = !unlocked;
|
|
}
|
|
</script>
|
|
|
|
<Button
|
|
onclick={handleClick}
|
|
variant={unlocked ? "default" : "outline"}
|
|
>
|
|
{#if unlocked}
|
|
<Lock class="mr-2 h-4 w-4" />
|
|
{t.wishlist.lockDeletion}
|
|
{:else}
|
|
<LockOpen class="mr-2 h-4 w-4" />
|
|
{t.wishlist.unlockDeletion}
|
|
{/if}
|
|
</Button>
|