use abstract_macros::with_abstract_event;
use cosmwasm_std::{Attribute, Response};
use crate::features::ModuleIdentification;
pub trait AbstractResponse: ModuleIdentification {
    fn response(&self, action: impl Into<String>) -> Response {
        self.custom_response(action, Vec::<Attribute>::new())
    }
    fn custom_response(
        &self,
        action: impl Into<String>,
        attributes: impl IntoIterator<Item = impl Into<Attribute>>,
    ) -> Response {
        let module_id = self.module_id();
        let response = Response::new();
        with_abstract_event!(response, module_id, action, attributes)
    }
}
impl<T> AbstractResponse for T where T: ModuleIdentification {}