<?php
/**
 * Notification Helper for Easy Invoice
 *
 * @package Easy_Invoice
 */

if (!defined('ABSPATH')) {
    exit;
}

/**
 * Display notification messages
 *
 * @param string $type    The type of notification (success, error, warning, info)
 * @param string $message The message to display
 */
function easy_invoice_display_notification($type, $message) {
    $bg_class = '';
    $icon_class = '';
    
    switch ($type) {
        case 'success':
            $bg_class = 'bg-green-100 border-green-400 text-green-700';
            $icon_class = 'fas fa-check-circle';
            break;
        case 'error':
            $bg_class = 'bg-red-100 border-red-400 text-red-700';
            $icon_class = 'fas fa-exclamation-circle';
            break;
        case 'warning':
            $bg_class = 'bg-yellow-100 border-yellow-400 text-yellow-700';
            $icon_class = 'fas fa-exclamation-triangle';
            break;
        default:
            $bg_class = 'bg-blue-100 border-blue-400 text-blue-700';
            $icon_class = 'fas fa-info-circle';
    }
    
    echo '<div class="border-l-4 p-4 mb-4 ' . esc_attr($bg_class) . '">';
    echo '<div class="flex">';
    echo '<div class="flex-shrink-0">';
    echo '<i class="' . esc_attr($icon_class) . '"></i>';
    echo '</div>';
    echo '<div class="ml-3">';
    echo '<p class="text-sm">' . esc_html($message) . '</p>';
    echo '</div>';
    echo '</div>';
    echo '</div>';
} 