<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
<head>
    <meta name="viewport" content="width=device-width" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Mail Template</title>
    <style type="text/css">
        img {
            max-width: 100%;
        }
        body {
            -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; line-height: 1.6em;
        }
        body {
            background-color: #f6f6f6;
            color: #7d7b7b;
        }
        @media  only screen and (max-width: 640px) {
            body {
                padding: 0 !important;
            }
            h1 {
                font-weight: 800 !important; margin: 20px 0 5px !important;
            }
            h2 {
                font-weight: 800 !important; margin: 20px 0 5px !important;
            }
            h3 {
                font-weight: 800 !important; margin: 20px 0 5px !important;
            }
            h4 {
                font-weight: 800 !important; margin: 20px 0 5px !important;
            }
            h1 {
                font-size: 22px !important;
            }
            h2 {
                font-size: 18px !important;
            }
            h3 {
                font-size: 16px !important;
            }
            .container {
                padding: 0 !important; width: 100% !important;
            }
            .content {
                padding: 0 !important;
            }
            .content-wrap {
                padding: 10px !important;
            }
            .invoice {
                width: 100% !important;
            }
        }
    </style>
</head>
<body style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 14px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; line-height: 1.6em; background-color: #f6f6f6; margin: 0;" bgcolor="#f6f6f6">
<table class="body-wrap" style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 14px; width: 100%; background-color: #f6f6f6; margin: 0;" bgcolor="#f6f6f6">
    <tr style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
        <td style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0;" valign="top"></td>
        <td class="container" width="700" style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; display: block !important; max-width: 700px !important; clear: both !important; margin: 0 auto;" valign="top">
            <div class="content" style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 14px; max-width: 700px; display: block; margin: 0 auto; padding: 20px;">
                <table class="main" width="100%" cellpadding="0" cellspacing="0" itemprop="action" itemscope itemtype="http://schema.org/ConfirmAction" style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 14px; border-radius: 3px; background-color: #fff; margin: 0; border: 1px solid #e9e9e9;" bgcolor="#fff">
                    <tr style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
                        <td class="content-wrap" style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; border-bottom: 1px solid #f1efef; font-size: 14px; text-align: center; vertical-align: top; margin: 0; padding: 20px;" valign="top">
                            @if(!empty($mailParams['web']))
                                <a href="{{$mailParams['web']}}" target="_blank"><img src="{{$mailParams['logo']}}" height="50" /></a>
                            @else
                                <img src="{{$mailParams['logo']}}" height="50" />
                            @endif
                        </td>
                    </tr>
                    <tr style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
                        <td class="content-wrap" style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 20px;" valign="top">
                            <meta itemprop="name" content="Confirm Email" style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;" />
                            <table width="100%" cellpadding="0" cellspacing="0" style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
                                <tr style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
                                    <td class="content-block" style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top">
                                        <h2 class="aligncenter" style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 24px; color: #d71f26; line-height: 1.2em; font-weight: 400; text-align: left; margin: 10px 0 0; letter-spacing: -1px;">{{ __('general-hi') }},  {{$mailParams['name_surname']}}</h2>
                                    </td>
                                </tr>
                                <tr style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
                                    <td class="content-block" style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top">

                                               {!! $bookingData !!}

                                               <br/><br/>

                                                @if($mailParams['bookingChannelId'] != 1 || true)

                                            <table width="100%" cellpadding="0" cellspacing="0" style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
                                                <tr style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
                                                    <td class="content-block" style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top">
                                                        <table width="100%" style="margin-bottom: 20px;">
                                                            <tr>
                                                                <td style="padding-top: 0px;" colspan="2">
                                                                    <b>{{__('mail-booking-channel')}}:</b> {{$mailParams['bookingChannelName']}}
                                                                </td>
                                                            </tr>
                                                            @if(!empty($mailParams['bookingChannelCode']))
                                                            <tr>
                                                                <td style="padding-top: 0px;" colspan="2">
                                                                    <b>{{__('mail-booking-confirmation-code')}}:</b> {{$mailParams['bookingChannelCode']}}
                                                                </td>
                                                            </tr>
                                                            @endif
                                                            <tr>
                                                                <td colspan="2">&nbsp;</td>
                                                            </tr>
                                                            <tr>
                                                                <td style="padding-top: 0px;" colspan="2">
                                                                    <b>{{__('mail-booking-name-surname')}}:</b> {{$mailParams['bookingChannelContactNameSurname']}} @if(!empty($mailParams['countryCode'])) ({{$mailParams['countryCode']}}) @endif
                                                                </td>
                                                            </tr>
                                                            @if(!empty($mailParams['bookingChannelContactEmail']))
                                                            <tr>
                                                                <td style="padding-top: 0px;">
                                                                    <b>{{__('mail-booking-email')}}:</b> {{fillOnUndefined($mailParams,'bookingChannelContactEmail', '-')}}
                                                                </td>
                                                            </tr>
                                                            @endif
                                                            @if(!empty($mailParams['bookingChannelContactPhone']))
                                                                <tr>
                                                                    <td style="padding-top: 0px;">
                                                                        <b>{{__('mail-booking-phone')}}:</b> {{fillOnUndefined($mailParams,'bookingChannelContactPhone', '-')}}
                                                                    </td>
                                                                </tr>
                                                            @endif
                                                            @if(isset($mailParams['isBookingGenius']) && $mailParams['isBookingGenius'])
                                                                <tr>
                                                                    <td style="padding-top: 0px;">
                                                                        <span style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 12px; color: #FFF; text-decoration: none; font-weight: bold; text-align: center; display: inline; border-radius: 5px; text-transform: capitalize; background-color: #4299f9; margin: 0; border-color: #4299f9; border-style: solid; border-width: 5px 10px;">Booking.com Genius</span>
                                                                    </td>
                                                                </tr>
                                                            @endif
                                                            <tr>
                                                                <td colspan="2">&nbsp;</td>
                                                            </tr>
                                                            <tr>
                                                                <td style="padding-top: 0px;">
                                                                    <b>{{__('mail-booking-checkin')}}:</b> {{$mailParams['checkin_date']}}
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td style="padding-top: 0px;">
                                                                    <b>{{__('mail-booking-checkout')}}:</b> {{$mailParams['checkout_date']}}
                                                                </td>
                                                            </tr>
                                                        </table>

                                                        @foreach($mailParams['bookingChannelRoom'] as $perRoom)
                                                        <table width="100%" style="margin-bottom: 20px;">
                                                            <tr>
                                                                <td style="padding-top: 5px;">
                                                                    <b>{{__('mail-booking-room_order', ['order' => $perRoom['roomOrder']])}}:</b> {{$perRoom['roomName']}}
                                                                </td>
                                                                <td style="padding-top: 5px; text-align: right;">
                                                                    <b>{{$perRoom['roomRateName']}}</b>
                                                                </td>
                                                            </tr>


                                                                <tr>
                                                                    <td style="padding-bottom: 5px;" colspan="2">
                                                                        <b>{{__('mail-booking-occupany')}}:</b> {{$perRoom['occupancyText']}}
                                                                    </td>
                                                                </tr>

                                                            @if(isset($perRoom['cancellationPolicy']) && !empty($perRoom['cancellationPolicy']))
                                                                <tr>
                                                                    <td style="padding-bottom: 5px;" colspan="2">
                                                                        <b>{{__('enw-offer-cancellation_policy-title')}}:</b> {{$perRoom['cancellationPolicy']}}
                                                                    </td>
                                                                </tr>
                                                            @endif

                                                            @foreach($perRoom['dailyAmount'] as $dailyAmount)
                                                                <tr>
                                                                    <td style="padding-top: 0px;">
                                                                        <b>{{\Carbon\Carbon::parse($dailyAmount['date'])->format('d.m.Y')}}</b>
                                                                    </td>
                                                                    <td style="padding-top: 0px; text-align: right;">
                                                                        {{floatval($dailyAmount['amount'])}} {{$dailyAmount['currency_code']}}
                                                                    </td>
                                                                </tr>
                                                            @endforeach
                                                            <tr>
                                                                <td colspan="2"><hr style="border: 1px dashed #f1efef;"></td>
                                                            </tr>
                                                            @if(isset($perRoom['additionalFee']) && !empty($perRoom['additionalFee']))
                                                                <tr>
                                                                    <td colspan="2">
                                                                        <table width="100%" style="margin-bottom: 20px;">
                                                                            @foreach($perRoom['additionalFee'] as $additionalFeeKey => $additionalFee)
                                                                                <tr>
                                                                                    <td style="padding-top: 5px; width: 150px; vertical-align: top;"><b>Fee Type:</b></td>
                                                                                    <td style="text-align: right">{{$additionalFee['name']}}</td>
                                                                                </tr>
                                                                                @if($additionalFee['is_inclusive'])
                                                                                    <tr>
                                                                                        <td style="padding-top: 5px; width: 150px; vertical-align: top;"><b>Included:</b></td>
                                                                                        <td style="text-align: right">@if($additionalFee['is_inclusive']) Yes @else No @endif</td>
                                                                                    </tr>
                                                                                @else
                                                                                    <tr>
                                                                                        <td style="padding-top: 5px; width: 150px; vertical-align: top;"><b>Total:</b></td>
                                                                                        <td style="text-align: right">{{$additionalFee['total_price']}} {{$mailParams['currency_code']}}</td>
                                                                                    </tr>
                                                                                @endif
                                                                            @endforeach
                                                                            <tr>
                                                                                <td colspan="2"><hr style="border: 1px solid #f1efef;"></td>
                                                                            </tr>
                                                                        </table>
                                                                    </td>
                                                                </tr>
                                                            @endif


                                                            @if(!empty($perRoom['discount_amount']) || $perRoom['discount_amount'] > 0)

                                                                <tr>
                                                                    <td style="padding-top: 0px;">
                                                                        <b>{{__('mail-booking-discount')}}:</b>
                                                                    </td>
                                                                    <td style="padding-top: 0px; text-align: right; font-weight: bold;">
                                                                        - {{$perRoom['discount_amount']}} {{$perRoom['currencyCode']}}
                                                                    </td>
                                                                </tr>

                                                                <tr>
                                                                    <td style="padding-top: 0px;">
                                                                        <b>{{__('mail-booking-total')}}:</b>
                                                                    </td>
                                                                    <td style="padding-top: 0px; text-align: right;">
                                                                        {{$perRoom['total']}} {{$perRoom['currencyCode']}}
                                                                    </td>
                                                                </tr>

                                                            @else
                                                                <tr>
                                                                    <td style="padding-top: 0px;">
                                                                        <b>{{__('mail-booking-total')}}:</b>
                                                                    </td>
                                                                    <td style="padding-top: 0px; text-align: right;">
                                                                        {{$perRoom['total']}} {{$perRoom['currencyCode']}}
                                                                    </td>
                                                                </tr>

                                                            @endif


                                                        </table>


                                                        @if(isset($perRoom['extraParam']) && !empty($perRoom['extraParam']))
                                                            <table width="100%" style="margin-bottom: 20px;">
                                                                @foreach($perRoom['extraParam'] as $extraParamKey => $extraParam)
                                                                <tr>
                                                                    <td style="padding-top: 5px; width: 150px; vertical-align: top;">
                                                                        <b>{{$extraParam['title']}}</b>
                                                                    </td>
                                                                    <td style="padding-top: 5px;">
                                                                        @if($extraParamKey == 'cancel_penalties')
                                                                            <table width="100%">
                                                                            @foreach($extraParam['value'] as $policyKey => $policyValue)
                                                                                <tr>
                                                                                    <td>From {{\Carbon\Carbon::parse($policyValue['from'])->format('M, d Y - H:i:s')}}</td>
                                                                                    <td style="text-align: right;">{{$policyValue['amount']}} {{strtoupper($policyValue['currency'])}}</td>
                                                                                </tr>
                                                                            @endforeach
                                                                            </table>
                                                                        @else
                                                                            {!! $extraParam['value'] !!}
                                                                        @endif
                                                                    </td>
                                                                </tr>
                                                                @endforeach
                                                            </table>
                                                        @endif

                                                        @endforeach

                                                        @if(isset($mailParams['bookingAddon']) && !empty($mailParams['bookingAddon']))
                                                            <table width="100%" style="margin-bottom: 20px;">
                                                                <tr>
                                                                    <td colspan="3" style="padding-top: 5px;padding-bottom: 5px; vertical-align: top;">
                                                                        <b>{{__('be-label-additional-products')}}</b>
                                                                    </td>
                                                                </tr>
                                                                @foreach($mailParams['bookingAddon'] as $bookingAddonKey => $bookingAddon)
                                                                    <tr>
                                                                        <td colspan="3" style="padding-top: 5px; vertical-align: top;">
                                                                            <b>{{__($bookingAddon['language_key'])}}</b>
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td style="padding-top: 5px; width: 150px; vertical-align: top;">
                                                                            @if(!empty($bookingAddon['title']))
                                                                                <span>{{$bookingAddon['title']}}</span>
                                                                            @else
                                                                                <span>{{__($bookingAddon['language_key'])}}</span>
                                                                            @endif
                                                                        </td>
                                                                        <td style="text-align: right;">{{$bookingAddon['count']}} x {{$bookingAddon['amount']}} {{strtoupper($bookingAddon['currency_code'])}}</td>
                                                                        <td style="text-align: right;">{{$bookingAddon['total']}} {{strtoupper($bookingAddon['currency_code'])}}</td>
                                                                    </tr>
                                                                @endforeach
                                                            </table>
                                                        @endif

                                                        <table width="100%" style="margin-bottom: 20px;">
                                                            <tr>
                                                                <td colspan="2"><hr style="border: 1px solid #f1efef;"></td>
                                                            </tr>
                                                            <tr>
                                                                <td style="padding-top: 5px;">
                                                                    <b>{{__('mail-booking-grand_total')}}:</b>
                                                                </td>
                                                                <td style="padding-top: 5px; text-align: right;">
                                                                    <b>{{$mailParams['total']}} {{$mailParams['currency_code']}}</b>
                                                                </td>
                                                            </tr>
                                                        </table>

                                                        @if($mailParams['payment_type_code'] != 'CHN')
                                                        <table width="100%" style="margin-bottom: 20px;">

                                                            @if($mailParams['payment_type_code'] == 'HTL')
                                                                @if(isset($mailParams['payAtHotelCreditCardCheck']) && !$mailParams['payAtHotelCreditCardCheck'])
                                                                <tr>
                                                                    <td style="padding-top: 0px;">
                                                                        <b>{{__('mail-booking-payment')}}:</b> {!! $mailParams['bookingChannelPaymentType'] !!}
                                                                    </td>
                                                                </tr>
                                                                @endif
                                                            @else
                                                                <tr>
                                                                    <td style="padding-top: 0px;">
                                                                        <b>{{__('mail-booking-payment')}}:</b> {!! $mailParams['bookingChannelPaymentType'] !!}
                                                                    </td>
                                                                </tr>
                                                            @endif


                                                            <tr>
                                                                <td style="padding-top: 0px;">
                                                                    @if(!empty($mailParams['bookingChannelPaymentSource']))
                                                                        <b>{{__('mail-booking-payment_source')}}:</b> {!! $mailParams['bookingChannelPaymentSource'] !!} <br />
                                                                    @endif
                                                                </td>
                                                            </tr>
                                                        </table>
                                                        @endif


                                                        @if(isset($mailParams['creditCardInformation']) && !empty($mailParams['creditCardInformation']))
                                                            <table width="100%" style="margin-bottom: 20px;">
                                                                <tr>
                                                                    <td style="padding-top: 0px;">
                                                                        <b>{{__('mail-booking-cardholder_name')}}:</b> {{$mailParams['creditCardInformation']['cardHolderName']}}
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td style="padding-top: 0px;">
                                                                        <b>{{__('mail-booking-card_number')}}:</b> {{$mailParams['creditCardInformation']['cardNumber']}}
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td style="padding-top: 0px;">
                                                                        <b>{{__('mail-booking-expiration_date')}}:</b> {{$mailParams['creditCardInformation']['expirationDate']}}
                                                                    </td>
                                                                </tr>
                                                                @if(!empty($mailParams['showCreditCardUrl']))
                                                                <tr>
                                                                    <td style="padding-top: 5px;">
                                                                        <a href="{{$mailParams['showCreditCardUrl']}}" target="_blank" class="btn-primary" itemprop="url" style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 12px; color: #FFF; text-decoration: none; font-weight: bold; text-align: center; cursor: pointer; display: inline; border-radius: 5px; text-transform: capitalize; background-color: #d71f26; margin: 0; border-color: #d71f26; border-style: solid; border-width: 5px 10px;">{{__('mail-booking-show_credit_card_info')}}</a>
                                                                    </td>
                                                                </tr>
                                                                @endif
                                                            </table>
                                                        @endif


                                                        @if(!empty($mailParams['bookingChannelNote']))
                                                            <table width="100%" style="margin-bottom: 0px;">
                                                                <tr>
                                                                    <td style="padding-top: 0px;">
                                                                        <b>{{__('mail-booking-note')}}:</b>
                                                                        <hr style="border: 1px solid #f1efef;">
                                                                        <p>
                                                                            {!! $mailParams['bookingChannelNote'] !!}
                                                                        </p>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        @endif

                                                    </td>
                                                </tr>
                                            </table>

                                        @endif

                                                {{ __('api-mailling-booking-access_link-desc') }}

                                    </td>
                                </tr>
                                <tr style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
                                    <td class="content-block" style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top">
                                        <a href="{{$mailParams['url']}}" target="_blank" class="btn-primary" itemprop="url" style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 14px; color: #FFF; text-decoration: none; line-height: 2em; font-weight: bold; text-align: center; cursor: pointer; display: inline-block; border-radius: 5px; text-transform: capitalize; background-color: #d71f26; margin: 0; border-color: #d71f26; border-style: solid; border-width: 5px 10px;"> {{ __('api-mailling-booking_info-link') }}</a>
                                    </td>
                                </tr>
                                <tr style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
                                    <td class="content-block" style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top">
                                        <hr style="border: 1px solid #f1efef;margin-top: 20px;">
                                        <table width="100%">
                                            <tr>
                                                <td style="font-weight: bold;padding-top: 10px;color: #d71f26; font-size: 16px;">
                                                    <img src="{{config('app.client_server')}}/assets/img/logo/mini-logo.png" height="40" />
                                                </td>
                                                <td style="padding-top: 10px; text-align: right;color: #CCC;">
                                                    {{$mailParams['property_name']}}<br>
                                                    {{date('Y-m-d H:i:s')}}
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>


            </div>
        </td>
        <td style="font-family: 'Calibri', Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0;" valign="top"></td>
    </tr>
</table>
</body>
</html>
