//! Actions block.
//!
//! <https://api.slack.com/reference/block-kit/blocks#actions>

use crate::{BlockId, Element};
use serde::Serialize;

/// Actions block.
///
/// <https://api.slack.com/reference/block-kit/blocks#actions>
#[derive(Serialize, Debug, Clone)]
#[serde(rename_all = "snake_case")]
pub struct ActionsBlock {
    /// An array of interactive [element objects](https://api.slack.com/reference/messaging/block-elements) - [buttons](https://api.slack.com/reference/messaging/block-elements#button), [select menus](https://api.slack.com/reference/messaging/block-elements#select), [overflow menus](https://api.slack.com/reference/messaging/block-elements#overflow), or [date pickers](https://api.slack.com/reference/messaging/block-elements#datepicker).
    pub elements: Vec<Element>,

    /// A unique identifier for a block.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub block_id: Option<BlockId>,
}
