@php
    $bodyClass = 'sectors-detail';
    $layout_path = 'frontend.layouts.content-sidebar';
    if($sector->layout_type == 'blocks') {
        $bodyClass .= ' sectors-detail--blocks';
        $layout_path = 'frontend.layouts.main';

        if($sector->header_overlap) {
            $bodyClass .= ' header-over';
        }
    }
@endphp

@extends($layout_path, [
    'body_class' => $bodyClass,
    'objectEmbeds' => $sector->codeEmbeds
])

@if($sector->layout_type == 'blocks')

    @section('content')
        <div class="sectors-detail__content">
            @include('frontend.templates.components.blocks_section', ['blocks' => $sector->blocks])
        </div>
    @stop

@else

    @section('content-toolbar')
        @include('frontend.templates.components.share_buttons')
    @stop

    @section('content-top')
        <div class="rich-content">
            <h1>{{ $sector->tagline }}</h1>
        </div>
    @stop

    @section('content-left')
        @if($sector->summary)
            <div class="rich-content rich-content__objective">
                <div class="heading3">{!! strip_tags($sector->summary, '<b><sup><strong><sub><i><span><u>') !!}</div>
            </div>
        @endif
        @if($sector->content)
            <div class="rich-content">
                {!! $sector->content !!}
            </div>
        @endif
    @stop

    @section('content-footer')
        @if($sector->relatedSolutions->count())
            @include(
                'frontend.templates.components.generic_related_slider',
                [
                    'title' => $sector->title . ' ' . trans('frontend.solutions_and_products'),
                    'items' => $sector->relatedSolutions,
                    'itemImageField' => 'overviewImage',
                    'itemImageSize' => '400x400'
                ]
            )
        @endif
        @include('frontend.templates.components.simple_related_items', array('title' => trans('frontend.related_case_studies')))
    @stop
@endif
