manabrew_protocol/prompts/
pay_mana_cost.rs1use serde::{Deserialize, Serialize};
2use ts_rs::TS;
3
4use crate::prompts::common::{PaymentAction, PromptPresentation};
5
6#[derive(Debug, Clone, Serialize, Deserialize, TS)]
7#[serde(rename_all = "camelCase")]
8#[ts(export, export_to = "prompts/payManaCost.ts")]
9pub struct PayManaCostInput {
10 pub presentation: PromptPresentation,
11 pub card_id: String,
12 pub card_name: String,
13 pub mana_cost: String,
14 pub can_confirm_from_pool: bool,
15 pub actions: Vec<PaymentAction>,
16}
17
18#[derive(Debug, Clone, Serialize, Deserialize, TS)]
19#[serde(
20 tag = "type",
21 rename_all = "camelCase",
22 rename_all_fields = "camelCase"
23)]
24#[ts(export, export_to = "prompts/payManaCost.ts")]
25pub enum PayManaCostOutput {
26 Act {
27 action_id: String,
28 },
29 Pay {
30 #[serde(default)]
31 auto: bool,
32 },
33 Cancel,
34}