<div class="landing-tile landing-tile--{{ $tile->cols }} landing-tile--{{ $tile->colsSm }} landing-tile--{{ $tile->text_scheme }} landing-tile--{{ $tile->type }}">
    <div class="landing-tile__wrap">
        @if(!empty($tile->image))
            @if($tile->cols !== 'single')
                {!! getMediaImg($tile->image, '1180x640', htmlspecialchars(''), 'landing-tile__bg') !!}
            @else
                {!! getMediaImg($tile->image, '500x640', htmlspecialchars(''), 'landing-tile__bg') !!}
            @endif
        @endif
        @if(!empty($tile->overlay_color))
            <div class="landing-tile__color-overlay" style="background-color:{{ $tile->overlay_color }};opacity: {{ $tile->overlay_opacity ? $tile->overlay_opacity : '100' }}%;"></div>
        @endif
        <div class="landing-tile__content">
        @if ($tile->type == 'generic')
            <div class="landing-tile__text landing-tile__text--overlay-{{ $tile->overlay }} landing-tile__text--{{ $tile->text_position }}">
                {!! $tile->content !!}
            </div>
            @if($tile->call_to_action)
                <div class="landing-tile__button">
                    {!! generateLink($tile->call_to_action, 'std-button std-button--' . ($tile->text_scheme == 'dark' && $tile->text_position == 'top' && $tile->overlay == 'yes' ? 'light' : $tile->text_scheme )) !!}
                </div>
            @endif

            @if($tile->contact)
                <div class="landing-tile__button">
                    <a
                        href="#"
                        class="std-button std-button--{{ $tile->text_scheme == 'dark' && $tile->text_position == 'top' && $tile->overlay == 'yes' ? 'light' : $tile->text_scheme }}"
                        data-name="{{ $tile->contact->name }}"
                        data-contact="{{ base64_encode(json_encode(["Contact_person" => $tile->contact->name ])) }}"
                        data-controller="components/form-modal"
                        data-popupid="contact-us-modal">
                        {{ $tile->contact_button_label ? $tile->contact_button_label : $tile->contact->title }}
                    </a>
                </div>
            @endif
        @elseif ($tile->type == 'text')
            <div class="landing-tile__text">
                <div class="landing-tile__text-content">
                    {!! $tile->content !!}
                </div>
            </div>
            @if(!empty($tile->call_to_action))
                <div class="landing-tile__button">
                    {!! generateLink($tile->call_to_action, 'std-button std-button--' . $tile->text_scheme) !!}
                </div>
            @endif
            @if(!empty($tile->contact))
                <div class="landing-tile__button">
                    <a
                        href="#"
                        class="std-button std-button--{{ $tile->text_scheme == 'dark' && $tile->text_position == 'top' && $tile->overlay == 'yes' ? 'light' : $tile->text_scheme }}"
                        data-name="{{ $tile->contact->name }}"
                        data-contact="{{ base64_encode(json_encode(["Contact_person" => $tile->contact->name ])) }}"
                        data-controller="components/form-modal"
                        data-popupid="contact-us-modal">
                        {{ $tile->contact_button_label ? $tile->contact_button_label : $tile->contact->title }}
                    </a>
                </div>
            @endif
        @elseif ($tile->type == 'testimonial' && $tile->testimonial)
            <div class="landing-tile__bg-overlay"></div>
            <div class="landing-tile__testimonial">
                @if($tile->testimonial->photo)
                <div class="landing-tile__avatar">
                    {!! getMediaImg($tile->testimonial->photo, '200x200', htmlspecialchars($tile->testimonial->title)) !!}
                </div>
                @endif
                <h4>{{ $tile->testimonial->title }}</h4>
                <h5>
                    <b>
                        {{ $tile->testimonial->role }}
                    </b>
                    <i>
                        {{ $tile->testimonial->role && $tile->testimonial->company ? trans('frontend.at') : '' }}
                    </i>
                    <b>
                        {{ $tile->testimonial->company }}
                    </b>
                </h5>
                {!! $tile->testimonial->quote !!}
            </div>
            @if($tile->call_to_action)
                <div class="landing-tile__button">
                    {!! generateLink($tile->call_to_action, 'std-button std-button--dark') !!}
                </div>
            @endif

            @if($tile->contact)
                <div class="landing-tile__button">
                    <a
                        href="#"
                        class="std-button"
                        data-name="{{ $tile->contact->name }}"
                        data-contact="{{ base64_encode(json_encode(["Contact_person" => $tile->contact->name ])) }}"
                        data-controller="components/form-modal"
                        data-popupid="contact-us-modal">
                        {{ $tile->contact_button_label ? $tile->contact_button_label : $tile->contact->title }}
                    </a>
                </div>
            @endif
        @endif
        </div>
    </div>
</div>
