<?php

/**
 * Helper functions for the FlashMessages::class
 * 
 */

if(!function_exists('neurogenesis_theme_flash_message_add')) {
    /**
     * mango_flash_message_add Helper function to add a flash message
     *
     * @param  mixed $message
     * @param  mixed $status
     * @return void
     */
    function neurogenesis_theme_flash_message_add($message, $status = 'success') 
    {
        $flashMessages = \NeurogenesisTheme\Core\FlashMessages::getInstance();
        $flashMessages->addMessage($message, $status);
    }
}

if (!function_exists('neurogenesis_theme_flash_messages_show')) {
    /**
     * mango_flash_messages_show Helper function to display flash messages
     *
     * @param  mixed $echo
     * @return void
     */
    function neurogenesis_theme_flash_messages_show($echo = true)
    {
        $flashMessages = \NeurogenesisTheme\Core\FlashMessages::getInstance();
        $flashMessages->displayMessages($echo);
    }
}