<?php
/**
 * Notice: What's new in 1.1.8
 */

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

$manfiet_title_callback = function() {
    /* translators: %s: Plugin version number. */
    return sprintf( esc_html__( "What's New in Manfi Expense Tracker v%s", 'manfi-expense-tracker' ), MANFIET_EXPENSE_TRACKER_VERSION );
};

$manfiet_message_callback = function() {
    /* translators: %s: Plugin version number. */
    $whats_new_title = sprintf( esc_html__( 'What’s new in v%s', 'manfi-expense-tracker' ), MANFIET_EXPENSE_TRACKER_VERSION );

    return wp_kses_post(
        '<div style="line-height: 1.6; max-width: 900px; padding: 5px 0;">' .
            '<p><strong style="color: #2563eb; font-size: 16px;">' . $whats_new_title . '</strong></p>' .
            '<p>' . esc_html__( 'This release introduces automated invoice overdue fee calculations, custom per-invoice late fee controls, public invoice Terms & Conditions, and adjustment display improvements.', 'manfi-expense-tracker' ) . '</p>' .

            '<h4 style="margin: 14px 0 6px; color: #0f172a;">⚡ Automated Overdue Late Fees & Terms & Conditions</h4>' .
            '<ul style="margin: 6px 0 12px 20px; list-style-type: disc;">' .
                '<li>' . esc_html__( 'Automated Overdue Late Fees: Configure global fine percentages (e.g. 5%) on overdue invoices with 1-click automatic adjustment calculation when linking unpaid past invoices.', 'manfi-expense-tracker' ) . '</li>' .
                '<li>' . esc_html__( 'Per-Invoice Overdue Fee Control: Added an "Overdue Due Fee (%)" field directly beside the Due Date in the Invoice Builder.', 'manfi-expense-tracker' ) . '</li>' .
                '<li>' . esc_html__( 'Public Terms & Conditions: Automatically renders a dedicated Terms & Conditions block on web and PDF invoices specifying payment deadlines and overdue fee policies.', 'manfi-expense-tracker' ) . '</li>' .
                '<li>' . esc_html__( 'Accurate Adjustment Display: Fixed table row adjustment amounts to precisely match currency, note, and totals summaries.', 'manfi-expense-tracker' ) . '</li>' .
            '</ul>' .

            '<p style="margin-top: 16px; padding-top: 12px; border-top: 1px solid #e2e8f0;">' .
                '<strong>' . esc_html__( 'Thank you for choosing Manfi Expense Tracker!', 'manfi-expense-tracker' ) . '</strong> ' .
                esc_html__( 'Enjoy the updated invoice automation features.', 'manfi-expense-tracker' ) .
            '</p>' .
        '</div>'
    );
};

return [
    'id'       => 'whats-new',
    'type'     => 'info',
    'title'    => $manfiet_title_callback,
    'message'  => $manfiet_message_callback,
    'version'  => MANFIET_EXPENSE_TRACKER_VERSION,
    'priority' => 10,
];
