<x-emails.layout>
    @php
        if($body->status==='pending'){

            $intro = 'We wish to inform you that your transfer request of <strong>'.$body->amount.'</strong> to <strong>'.$body->receiver_name.'</strong> has been received and is pending review by our administrators';

            $last = 'This transaction might take up to a few minutes to process as we are handling a lot of requests at the same time <br>
                You will receive an email on the status of your transfer as soon as it is processed.
            ';
            $status = 'Under Review';

        }elseif($body->status==='ongoing'){

            $intro = 'We wish to inform you that your transfer request of <strong>'.$body->amount.'</strong> to <strong>'.$body->receiver_name.'</strong> has been viewed by our administrators';
            $last = 'This transaction might take up to a few minutes to process as we are handling a lot of requests at the same time <br>
                You will receive an email on the status of your transfer as soon as it is processed.
            ';
            $status = 'In Progress';

        }elseif($body->status==='hold'){

            $intro = 'We wish to inform you that your transfer request of <strong>'.$body->amount.'</strong> to <strong>'.$body->receiver_name.'</strong> has been placed on hold by IMF. <br>
                Provide your IMF Clearing code through the customer support ticket or contact imf directly on
                <a href="mailto:'.config('settings.imf_email_address').'">'.config('settings.imf_email_address').' </a> to release your funds.
            ';
            $last = 'You are required to contact IMF at <a href="mailto:'.config('settings.imf_email_address').'">'.config('settings.imf_email_address').' </a> ';
            $status = 'Hold By IMF';


        }elseif($body->status==='approved'){

            $intro = 'We wish to inform you that your transfer request of <strong>'.$body->amount.'</strong> to <strong>'.$body->receiver_name.'</strong> has been approved and funds has been fully sent';
            $last = 'Thank you for banking with '.config('settings.site_name');
            $status = 'Successful';

        }elseif($body->status==='declined'){

            $intro = 'We wish to inform you that your transfer request of <strong>'.$body->amount.'</strong> to <strong>'.$body->receiver_name.'</strong> has been declined and funds are returned to your account.
            Kindly try again.';
            $last = 'Thank you for banking with '.config('settings.site_name');
            $status = 'Failed';

        }
    @endphp

    <table style="width:100%;max-width:620px;margin:0 auto; color:#9ea8bb;" cellpadding="0" cellspacing="0" bgcolor="#ffffff" >
        <tbody>
            <tr>
                <td style="text-align: left; padding: 30px 30px 0;">

                </td>
            </tr>
            <tr>
                <td style="text-align:left;padding: 15px 30px 5px 30px;">
                    <p style="margin-bottom: 16px;">
                        Dear {{ $body->username }}, <br>
                        {!! $intro !!}
                    </p>
                </td>
            </tr>
            <tr>
                <td style="padding: 15px 30px 5px 30px;">
                    <p>Here are the details of this transaction:</p>
                    <h2 style="font-size: 24px; color: #6576ff; font-weight: 600; margin-bottom: 8px;">TRANSACTION DETAILS</h2>
                    <p style="margin-bottom: 12px; border-bottom: 1px solid #ebe8e8">

                        <table style="font-family: arial, sans-serif;border-collapse: collapse;width: 100%;">

                            <tr style="text-align: left; padding: 8px; background-color: #ebe8e8;">
                                <td style="text-align: left; padding: 8px;">Receiver Name:</td>
                                <td style="text-align: left; padding: 8px;"><strong>{{ $body->receiver_name }}</strong></td>
                            </tr>
                            <tr style="text-align: left; padding: 8px;">
                                <td style="text-align: left; padding: 8px;">Receiver Account:</td>
                                <td style="text-align: left; padding: 8px;"> {{ $body->receiver_account }}</strong></td>
                            </tr>
                            <tr style="text-align: left; padding: 8px; background-color: #ebe8e8;">
                                <td style="text-align: left; padding: 8px;">Amount:</td>
                                <td style="text-align: left; padding: 8px;"><strong>{{ $body->amount }}</strong></td>
                            </tr>
                            <tr style="text-align: left; padding: 8px;">
                                <td style="text-align: left; padding: 8px;">Type:</td>
                                <td style="text-align: left; padding: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
                                    <strong>{{ $body->type }}</strong>
                                </td>
                            </tr>
                            <tr style="text-align: left; padding: 8px; background-color: #ebe8e8;">
                                <td style="text-align: left; padding: 8px;">Date:</td>
                                <td style="text-align: left; padding: 8px;"><strong>{{ $body->date }}</strong></td>
                            </tr>
                            <tr style="text-align: left; padding: 8px; ">
                                <td style="text-align: left; padding: 8px;">Status:</td>
                                <td style="text-align: left; padding: 8px;"><strong>{{ $status }}</strong></td>
                            </tr>

                        </table>
                    </p>
                </td>
            </tr>
            <tr>
                <td style="text-align: left; padding: 30px 30px 0;">
                    <p style="margin-bottom: 12px;">
                       {!! $last !!}
                    </p>
                    <p style="margin-bottom: 12px;">
                        Thank you.
                    </p>
                </td>
            </tr>
            <tr>
            </tr>
        </tbody>
    </table>

</x-emails.layout>
