<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<?php if($success === true) { ?>
<div class="alert alert-success w-full md:w-1/4 mx-auto mb-4">
    <?php if(isset($invoice['id']) && (int)$invoice['id'] > 0) {  // is update
        esc_html_e('Invoice updated', 'kirilkirkov-pdf-invoice-manager' );
    } else {
        esc_html_e('Invoice created', 'kirilkirkov-pdf-invoice-manager' );
        ?>
        <a class="text-white" href="<?php echo esc_url(admin_url( 'admin.php?page=' . $Config::SUB_MENU_PREVIEW_INVOICE_PAGE_SLUG . '&view=' . $preview_after_create )) ?>">
            <?php esc_html_e('Preview', 'kirilkirkov-pdf-invoice-manager' ); ?>
        </a>
        <?php
    } ?>
</div>
<?php } ?>

<?php if($success === false) { ?>
<div class="alert alert-danger w-full md:w-1/4 mx-auto mb-4">
    <?php esc_html_e('There are errors received', 'kirilkirkov-pdf-invoice-manager' ); ?>
</div>
<?php } ?>