Skip to main content

manabrew_protocol/prompts/
choose_boolean.rs

1use serde::{Deserialize, Serialize};
2use ts_rs::TS;
3
4use crate::prompts::common::PromptPresentation;
5
6#[derive(Debug, Clone, Serialize, Deserialize, TS)]
7#[serde(rename_all = "camelCase")]
8#[ts(export, export_to = "prompts/chooseBoolean.ts")]
9pub struct ChooseBooleanInput {
10    pub presentation: PromptPresentation,
11    pub confirm_label: String,
12    pub deny_label: String,
13}
14
15#[derive(Debug, Clone, Serialize, Deserialize, TS)]
16#[serde(
17    tag = "type",
18    rename_all = "camelCase",
19    rename_all_fields = "camelCase"
20)]
21#[ts(export, export_to = "prompts/chooseBoolean.ts")]
22pub enum ChooseBooleanOutput {
23    Decision { value: bool },
24}