import { InterFont } from "@kit-fonts/inter.slint";
// Public label overrides localize this fixture; toolkit/host defaults keep their language.
// SPDX-License-Identifier: GPL-3.0-or-later
import { ButtonIntent, DialogTabPolicy, KitAlertDialog, KitTheme, KitThemes } from "@kit";

export component Example inherits Window {
    default-font-family: InterFont.family;
    title: "KitAlertDialog — exemple";
    preferred-width: 560px;
    preferred-height: 360px;
    max-width: 100000px;
    max-height: 100000px;
    background: root.theme.canvas;
    in-out property <KitTheme> theme: KitThemes.light;
    in-out property <string> status;
    KitAlertDialog { tab-policy: DialogTabPolicy.native; theme: root.theme; width: parent.width; height: parent.height; title: "Supprimer ce projet ?"; description: "Le projet et ses notes sont supprimés pour tout le monde."; confirm-text: "Supprimer le projet"; cancel-text: "Conserver le projet"; confirm-intent: ButtonIntent.destructive; state: { open: true, topmost: true, busy: false }; confirmed => { root.status = "Suppression demandée"; } cancelled => { root.status = "Suppression annulée"; } if root.status != "": Text { text: root.status; color: root.theme.text-secondary; font-size: 12px * root.theme.text-scale; wrap: word-wrap; vertical-stretch: 0; } }
}
