import QtQuick import qs.Commons import qs.Ui // DeleteStage.qml - Delete: confirmed, and says so when it leaves a provider empty. // // One stage of the claude-mode panel. Panel.qml hands itself in as `panel` // and owns all the state and actions; this file only draws them. Column { id: stage required property var panel width: parent.width visible: stage.panel.stage === "presetDelete" spacing: Style.space(7) readonly property bool lastOne: stage.panel.stage === "presetDelete" && stage.panel.presetsOf(stage.panel.editProvider).length <= 1 Text { width: parent.width text: "Delete '" + stage.panel.editPreset + "'?" color: Color.popups.text elide: Text.ElideRight font.family: stage.panel.uiFont font.pixelSize: Style.space(13) font.bold: true } Text { width: parent.width text: "The preset file is removed, and there is no undo from here. Its key stays in the vault." color: Color.muted wrapMode: Text.WordWrap font.family: stage.panel.uiFont font.pixelSize: Style.space(10) } Text { width: parent.width visible: parent.lastOne text: "It is the only " + stage.panel.pTitle(stage.panel.editProvider) + " preset, so " + stage.panel.pTitle(stage.panel.editProvider) + " will have nothing to switch to until you create another." color: stage.panel.urgentColor wrapMode: Text.WordWrap font.family: stage.panel.uiFont font.pixelSize: Style.space(10) } Flow { width: parent.width spacing: Style.space(7) PillButton { fontFamily: stage.panel.uiFont; label: "Delete it"; primary: true; onTriggered: stage.panel.deletePreset() } PillButton { fontFamily: stage.panel.uiFont; label: "Back"; onTriggered: { stage.panel.lastError = ""; stage.panel.stage = "preset" } } } }