2025-11-01 15:49:29 +01:00
|
|
|
<script lang="ts">
|
2025-12-22 02:36:48 +01:00
|
|
|
import * as Dialog from '@cio/ui/base/dialog';
|
|
|
|
|
import { Button } from '@cio/ui/base/button';
|
2024-04-19 05:45:48 +01:00
|
|
|
import { t } from '$lib/utils/functions/translations';
|
2024-12-30 02:59:10 +01:00
|
|
|
import { deleteMemberModal } from './store';
|
2021-08-29 07:23:19 +03:00
|
|
|
|
2025-11-01 15:49:29 +01:00
|
|
|
let { email, deletePerson = () => {} } = $props();
|
2021-08-29 07:23:19 +03:00
|
|
|
|
|
|
|
|
async function handleDelete() {
|
|
|
|
|
deletePerson();
|
|
|
|
|
$deleteMemberModal.open = false;
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
2025-12-25 09:01:51 +00:00
|
|
|
<Dialog.Root bind:open={$deleteMemberModal.open}>
|
2025-12-22 02:36:48 +01:00
|
|
|
<Dialog.Content class="w-96 pt-3">
|
2025-12-25 09:01:51 +00:00
|
|
|
<Dialog.Header class="px-5 py-2">
|
2025-12-22 02:36:48 +01:00
|
|
|
<Dialog.Title>{$t('course.navItem.people.delete_confirmation.title')}</Dialog.Title>
|
|
|
|
|
</Dialog.Header>
|
|
|
|
|
<div>
|
2025-12-25 09:01:51 +00:00
|
|
|
<p class="mt-0 text-base dark:text-white">
|
|
|
|
|
{$t('course.navItem.people.delete_confirmation.sure')} <strong>{email}</strong>?
|
|
|
|
|
</p>
|
2021-08-29 07:23:19 +03:00
|
|
|
|
2025-12-25 09:01:51 +00:00
|
|
|
<div class="mt-5 flex items-center justify-between">
|
|
|
|
|
<Button variant="outline" onclick={() => ($deleteMemberModal.open = false)}>
|
|
|
|
|
{$t('course.navItem.people.delete_confirmation.no')}
|
|
|
|
|
</Button>
|
|
|
|
|
<Button variant="outline" onclick={handleDelete}>
|
|
|
|
|
{$t('course.navItem.people.delete_confirmation.yes')}
|
|
|
|
|
</Button>
|
|
|
|
|
</div>
|
2021-08-29 07:23:19 +03:00
|
|
|
</div>
|
2025-12-22 02:36:48 +01:00
|
|
|
</Dialog.Content>
|
|
|
|
|
</Dialog.Root>
|