# `Minga.Mode.DeleteConfirmState`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga/mode/delete_confirm_state.ex#L1)

FSM state for the file tree delete confirmation prompt.

Holds the path being deleted, whether it's a directory, and the child
count (for directory prompts). Also tracks whether this is the initial
trash prompt or the permanent-delete fallback prompt.

# `phase`

```elixir
@type phase() :: :trash | :permanent
```

# `t`

```elixir
@type t() :: %Minga.Mode.DeleteConfirmState{
  child_count: non_neg_integer(),
  count: non_neg_integer() | nil,
  dir?: boolean(),
  name: String.t(),
  path: String.t(),
  phase: phase()
}
```

# `new`

```elixir
@spec new(String.t(), String.t(), boolean(), non_neg_integer()) :: t()
```

Creates a new delete confirm state for the given file tree entry.

# `to_permanent`

```elixir
@spec to_permanent(t()) :: t()
```

Transitions to the permanent delete fallback prompt.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
