Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript
871 B
Raw Blame
import type { ReactNode } from 'react'

export type ConfirmDialogTone = 'default' | 'danger'
export type ConfirmDialogOutcome = 'confirm' | 'cancel' | 'discard'

export interface ConfirmDialogOptions {
  title?: string
  message: string
  /**
   * Optional rich content rendered below the message inside the dialog — used to
   * show structured detail (e.g. the list of Host/grant references a forced
   * action would strand) the operator must see before confirming.
   */
  details?: ReactNode
  confirmLabel?: string
  cancelLabel?: string
  discardLabel?: string
  tone?: ConfirmDialogTone
}

export interface ConfirmDialogRequest {
  id: number
  options: ConfirmDialogOptions
  resolve: (outcome: ConfirmDialogOutcome) => void
}

export interface ConfirmDialogProps {
  request: ConfirmDialogRequest | null
  onResolve: (outcome: ConfirmDialogOutcome) => void
}