/** * Centralised copy for confirmation dialogs. Keeping the text out of the * call sites lets a single place own wording for destructive actions and * makes it obvious from the constant name which scenario is being guarded. */ import type { ConfirmDialogTone } from '../components/ui/ConfirmDialog'; /** Static, scenario-typed text bundle consumed by ````. */ export interface ConfirmTexts { title: string; description: string; confirmLabel: string; cancelLabel: string; tone: ConfirmDialogTone; /** Optional label shown on the confirm button while the action runs. */ busyLabel?: string; } /** * Stop-tracking a previously-adopted chat theme. Hard-deletes the * ``visibility_prompts`` row created from the theme. * * @param {string} themeLabel - Human-readable theme name to quote in copy. * @returns {ConfirmTexts} Pre-formatted texts for the confirm modal. */ export const stopTrackingChatThemeTexts = ( themeLabel: string ): ConfirmTexts => ({ title: 'Stop tracking this chat theme?', description: `Stop tracking "${themeLabel}"? This permanently deletes the AI-search prompt created from this theme. This cannot be undone.`, confirmLabel: 'Stop tracking', cancelLabel: 'Cancel', tone: 'destructive', busyLabel: 'Stopping...', }); /** * Hard-delete an article and its full version history. * * @param {string} articleTitle - Human-readable article title for the prompt. * @returns {ConfirmTexts} Pre-formatted texts for the confirm modal. */ export const deleteArticleTexts = (articleTitle: string): ConfirmTexts => ({ title: 'Delete this article?', description: `Delete "${articleTitle}"? This hard-deletes the article and all version history. This cannot be undone.`, confirmLabel: 'Delete', cancelLabel: 'Cancel', tone: 'destructive', busyLabel: 'Deleting...', });