# `WardrikSlack.Waiting`

Lays out the calls an agent waits on as one Slack message.

  * Each call shows its tool, the policy's question and its arguments, with a note box and
    Approve and Deny buttons.
  * A call waiting on a sign-in has Show link instead. It shows only the person who pressed it
    where to sign in.

Each button's value holds the conversation, the call and who asked, for `WardrikSlack.Answers`.
This is safe because only the bot can change its own messages.

# `asked`

```elixir
@spec asked([WardrikChannel.Waiting.t()]) :: String.t()
```

Returns what `calls` ask for, in words.

    WardrikSlack.Waiting.asked(calls)
    #=> "approve `echo` and sign in for `mail`"

# `buttons_block`

```elixir
@spec buttons_block(String.t()) :: String.t()
```

Returns the block ID of the buttons for the call `id`.

# `calls_blocks`

```elixir
@spec calls_blocks([WardrikChannel.Waiting.t()]) :: [map()]
```

Returns the blocks for `calls`, each with its question and buttons.

# `message`

```elixir
@spec message([WardrikChannel.Waiting.t()], [String.t()] | :anyone) :: %{
  text: String.t(),
  blocks: [map()]
}
```

Returns the message that asks `approvers` about `calls`.

# `named`

```elixir
@spec named([String.t()]) :: String.t()
```

Returns `approvers` joined for a sentence. Member IDs become mentions.

    WardrikSlack.Waiting.named(["@maria", "@jon", "U024BE7LH"])
    #=> "@maria, @jon or <@U024BE7LH>"

# `note_block`

```elixir
@spec note_block(String.t()) :: String.t()
```

Returns the block ID of the note box for the call `id`.

---

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