@extends('crm::emails.saint-motors.layout', [
    'subject' => $enquiry->subject ?? 'Thank you for your enquiry',
    'site_name' => $site_name,
    'site_logo' => $site_logo,
    'site_url' => $site_url,
    'colours' => $colours,
])


@php
    $finance_url = \App\Facades\Site::url('/finance');
    $valuation_url = \App\Facades\Site::url('/valuation');
    $vehicle_url = '';
    if ($enquiry->reason && $enquiry->reason instanceof \Mtc\MercuryDataModels\Vehicle) {
        $vehicle_url = \App\Facades\Site::vehicleUrl($enquiry->reason);
    }
@endphp

@section('content')
    <!-- ALERT BLOCK -->
    <tr>
        <td valign="top" style="padding: 30px 40px;">
            <table cellpadding="0" cellspacing="0" border="0" align="center" width="100%">
                <tr>
                    <td valign="middle" align="center">
                        <h1 style="color:#FFFFFF !important; margin:0; font-size:30px; font-weight:500; letter-spacing:-0.6px; font-family: 'Clash Display', -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif; line-height: 1.2; padding: 0;">
                            Thank you for your enquiry
                        </h1>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <!-- END OF ALERT BLOCK -->
    <!-- DIVIDER -->
    <tr>
        <td style="padding: 0 40px;">
            <table cellpadding="0" cellspacing="0" border="0" width="100%">
                <tr>
                    <td height="1" bgcolor="#737373" style="background-color:#737373; opacity:0.3; font-size:0; line-height:0;">&nbsp;</td>
                </tr>
            </table>
        </td>
    </tr>
    <!-- CONTENT AREA -->
    <tr>
        <td valign="top">
            <table cellpadding="0" cellspacing="0" border="0" align="center" width="100%">
                <tr>
                    <td height="30"></td>
                </tr>

                <tr>
                    <td valign="top" width="40"></td>
                    <td valign="top" align="center">
                        {!! str_replace(
                            [
                                '[finance-button]',
                                '[valuation-button]',
                                '[reserve-button]',
                                '<p>',
                                '<h1>',
                                '<h2>',
                                '<h3>',
                                '<h4>',
                                '<h5>',
                                '<h6>',
                                '<ul>',
                                '<li>',
                                '<ol>',
                                '<td>',
                            ],
                            [
                                '<table cellpadding="0" cellspacing="0" border="0" align="left" width="100%"><tr><td valign="top">
                                <table cellpadding="0" cellspacing="0" border="0" align="left" width="400">
                                    <tr>
                                        <td align="center" style="border-radius: 5px; background-color: #f55800;">
                                            <a rel="noopener" href="' . $finance_url . '" target="_blank" style="font-size: 22px; font-family: \'Clash Display\', -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif; color: #FFFFFF; font-weight: 700; text-decoration: none;border-radius: 5px; padding: 14px 18px; border: 1px solid #f55800; display: inline-block;">
                                                Check Finance
                                            </a>
                                        </td>
                                    </tr>
                                </table></td></tr><tr>
    <td height="40"></td>
</tr></table>',
                                '<table cellpadding="0" cellspacing="0" border="0" align="left" width="100%"><tr><td valign="top">
                                <table cellpadding="0" cellspacing="0" border="0" align="left" width="400">
                                    <tr>
                                        <td align="center" style="border-radius: 5px; background-color: #f6f6f6;">
                                            <a rel="noopener" href="' . $valuation_url . '" target="_blank" style="font-size: 22px; font-family: \'Clash Display\', -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif; color: #1a1a1a; font-weight: 600; text-decoration: none;border-radius: 5px; padding: 26px 18px; border: 1px solid #f6f6f6; display: inline-block;">
                                                Value my car
                                            </a>
                                        </td>
                                    </tr>
                                </table></td></tr><tr>
    <td height="40"></td>
</tr></table>',
                                '<table cellpadding="0" cellspacing="0" border="0" align="left" width="100%"><tr><td valign="top">
                                <table cellpadding="0" cellspacing="0" border="0" align="left" width="400">
                                    <tr>
                                        <td align="center" style="border-radius: 5px; background-color: #f55800;">
                                            <a rel="noopener" href="' . $vehicle_url . '?journey=reserve" target="_blank" style="font-size: 22px; font-family: \'Clash Display\', -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif; color: #FFFFFF; font-weight: 700; text-decoration: none;border-radius: 5px; padding: 16px 18px; border: 1px solid #f55800; display: inline-block;">
                                                Reserve
                                            </a>
                                        </td>
                                    </tr>
                                </table></td></tr><tr>
    <td height="40"></td>
</tr></table>',
                                '<p style="color:#FFFFFF; margin:0; font-size:16px; font-weight:400; line-height:20px; font-family: \'Clash Display\', -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;">',
                                '<h1 style="color:#f6f6f6 !important; margin:0 0 13px; font-size:26px; font-weight:600; font-family: \'Clash Display\', -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;">',
                                '<h2 style="color:#f6f6f6 !important; margin:0 0 13px; font-size:26px; line-height:26px; font-weight:600; font-family: \'Clash Display\', -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;">',
                                '<h3 style="color:#f6f6f6 !important; margin:0 0 13px; font-size:26px; line-height:26px; font-weight:600; font-family: \'Clash Display\', -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;">',
                                '<h4 style="color:#f6f6f6 !important; margin:0 0 13px; font-size:26px; line-height:26px; font-weight:600; font-family: \'Clash Display\', -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;">',
                                '<h5 style="color:#f6f6f6 !important; margin:0 0 13px; font-size:26px; line-height:26px; font-weight:600; font-family: \'Clash Display\', -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;">',
                                '<h6 style="color:#f6f6f6 !important; margin:0 0 13px; font-size:26px; line-height:26px; font-weight:600; font-family: \'Clash Display\', -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;">',
                                '<ul style="color:#FFFFFF;">',
                                '<li style="color:#FFFFFF;">',
                                '<ol style="color:#FFFFFF;">',
                                '<td valign="top" width="20" style="color:#FFFFFF;">',
                            ],
                        $content) !!}
                    </td>
                    <td valign="top" width="40"></td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td valign="top" height="40"></td>
    </tr>
    <!-- END OF CONTENT AREA -->
@endsection


@section('footer')
    <tr>
        <td colspan="2" align="center" class="smallText">

            {!! str_replace(
                [
                    '<p>',
                    '<h1>',
                    '<h2>',
                    '<h3>',
                    '<h4>',
                    '<h5>',
                    '<h6>',
                    '<ul>',
                    '<li>',
                    '<ol>',
                    '<td>',
                ],
                [
                    '<p style="color:#FFFFFF; margin:0; font-size:12px; font-weight:500; font-family: \'Clash Display\', -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;">',
                    '<h1 style="color:#FFFFFF !important; margin:0; font-size:32px; font-weight:600; letter-spacing:-0.6px; font-family: \'Clash Display\', -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;">',
                    '<h2 style="color:#FFFFFF; margin:0 0 10px; font-size:32px; line-height:36px; font-weight:700; letter-spacing:-0.64px; font-family: \'Clash Display\', -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;">',
                    '<h3 style="color:#FFFFFF; margin:0 0 10px; font-size:24px; line-height:28px; font-weight:700; letter-spacing:-0.48px; font-family: \'Clash Display\', -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;">',
                    '<h4>',
                    '<h5>',
                    '<h6>',
                    '<ul>',
                    '<li>',
                    '<ol>',
                    '<td valign="top" width="20">',
                ],
            $footer) !!}
        </td>
    </tr>
@endsection
