/*
==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--

Namaste

Copyright (C) 2019, 2021-2025  Anonymous

There are several releases over multiple years,
they are listed as ranges, such as: "2021-2025".

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

::--::--::--::--::--::--::--::--::--::--::--::--::--::--::--::--
*/

/// # Wrapper for format!(), which wraps your message inside 'bold' tag
macro_rules! __b { ($($arg: tt)+) => {
    format!("\x1b[1m{}\x1b[m", format!($($arg)+))
};}

/// # Wrapper for format!(), which wraps your message inside a warning 'red color' tag
macro_rules! __w { ($($arg: tt)+) => {
    format!("\x1b[38;5;1m{}\x1b[39m", format!($($arg)+))
};}

/// # Wrapper for dia_args::lock_write_out(format!())...
macro_rules! __info { ($($arg: tt)+) => {
    dia_args::lock_write_out(format!("{note} {msg}", note=__b!("[info]"), msg=format!($($arg)+)))
};}

/// # Wrapper for dia_args::lock_write_err(format!())...
macro_rules! __warning { ($($arg: tt)+) => {
    dia_args::lock_write_err(format!("{note} {msg}", note=__w!("[warning]"), msg=format!($($arg)+)))
};}

/// # Wrapper for dia_args::lock_write_err(format!())...
macro_rules! __err { ($($arg: tt)+) => {
    dia_args::lock_write_err(format!("{note} {msg}", note=__w!("[error]"), msg=format!($($arg)+)))
};}
