use crate::relays::default_relays;
use fast_config::FastConfig;
use nostr::{EventId, PublicKey, RelayUrl};
use serde::Deserialize;
use serde::Serialize;
use std::default::Default;

/// NIP-65 Relay List
#[derive(Serialize, Deserialize, FastConfig, Clone)]
pub struct BaseRelaysConfig {
    pub read_relays: Vec<RelayUrl>,
    pub write_relays: Vec<RelayUrl>,
}

impl Default for BaseRelaysConfig {
    fn default() -> Self {
        Self {
            read_relays: default_relays(),
            write_relays: default_relays(),
        }
    }
}

#[derive(Serialize, Deserialize, FastConfig, Clone)]
pub struct UIConfig {
    pub locale: String,
}

impl Default for UIConfig {
    fn default() -> Self {
        Self {
            locale: String::from("en"),
        }
    }
}

#[derive(Serialize, Deserialize, FastConfig, Default, Clone)]
pub struct PrivateBookmarks {
    pub notes: Vec<EventId>,
    pub public_keys: Vec<PublicKey>,
}
