use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct NatsConfig {
    pub url: String,
    pub subject_prefix: String,
    pub max_reconnects: u32,
    pub reconnect_wait_ms: u64,
    pub auth_token: Option<String>,
    pub tls_cert_path: Option<String>,
    pub tls_key_path: Option<String>,
}

impl Default for NatsConfig {
    fn default() -> Self {
        Self {
            url: "nats://127.0.0.1:4222".to_string(),
            subject_prefix: "provisioning".to_string(),
            max_reconnects: 10,
            reconnect_wait_ms: 2000,
            auth_token: None,
            tls_cert_path: None,
            tls_key_path: None,
        }
    }
}
