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';
|
2026-03-09 11:18:22 +01:00
|
|
|
import { deleteConfirmation } from './store';
|
2021-09-24 08:17:22 +03:00
|
|
|
|
2026-05-09 06:05:03 +01:00
|
|
|
let {
|
|
|
|
|
title = $t('course.navItem.lessons.exercises.all_exercises.delete_confirmation.title'),
|
|
|
|
|
description = $t('course.navItem.lessons.exercises.all_exercises.delete_confirmation.sure'),
|
|
|
|
|
cancelLabel = $t('course.navItem.lessons.exercises.all_exercises.delete_confirmation.no'),
|
|
|
|
|
confirmLabel = $t('course.navItem.lessons.exercises.all_exercises.delete_confirmation.yes'),
|
|
|
|
|
onDelete = () => {},
|
|
|
|
|
onCancel = () => {}
|
|
|
|
|
} = $props();
|
2021-09-24 08:17:22 +03:00
|
|
|
</script>
|
|
|
|
|
|
2025-12-25 09:01:51 +00:00
|
|
|
<Dialog.Root bind:open={$deleteConfirmation.open}>
|
2025-12-22 02:36:48 +01:00
|
|
|
<Dialog.Content class="w-96">
|
|
|
|
|
<Dialog.Header>
|
2026-05-09 06:05:03 +01:00
|
|
|
<Dialog.Title>{title}</Dialog.Title>
|
2025-12-22 02:36:48 +01:00
|
|
|
</Dialog.Header>
|
|
|
|
|
<div>
|
2026-05-09 06:05:03 +01:00
|
|
|
<p class="mt-0 text-base dark:text-white">{description}</p>
|
2021-09-24 08:17:22 +03:00
|
|
|
|
2025-12-25 09:01:51 +00:00
|
|
|
<div class="mt-5 flex items-center justify-between">
|
|
|
|
|
<Button
|
|
|
|
|
variant="outline"
|
|
|
|
|
onclick={() => {
|
|
|
|
|
$deleteConfirmation.open = false;
|
|
|
|
|
onCancel();
|
|
|
|
|
}}
|
|
|
|
|
>
|
2026-05-09 06:05:03 +01:00
|
|
|
{cancelLabel}
|
2025-12-25 09:01:51 +00:00
|
|
|
</Button>
|
|
|
|
|
<Button
|
|
|
|
|
onclick={() => {
|
|
|
|
|
onDelete();
|
|
|
|
|
$deleteConfirmation.open = false;
|
|
|
|
|
}}
|
|
|
|
|
>
|
2026-05-09 06:05:03 +01:00
|
|
|
{confirmLabel}
|
2025-12-25 09:01:51 +00:00
|
|
|
</Button>
|
|
|
|
|
</div>
|
2021-09-24 08:17:22 +03:00
|
|
|
</div>
|
2025-12-22 02:36:48 +01:00
|
|
|
</Dialog.Content>
|
|
|
|
|
</Dialog.Root>
|