@php
    $app_local = get_default_language_code();
    $default = App\Constants\LanguageConst::NOT_REMOVABLE;
    $slug = Illuminate\Support\Str::slug(App\Constants\SiteSectionConst::ABOUT_US_SECTION);
    $about = App\Models\Admin\SiteSections::getData($slug)->first();
    $faq_slug = Illuminate\Support\Str::slug(App\Constants\SiteSectionConst::FAQ_SECTION);
    $faq = App\Models\Admin\SiteSections::getData($faq_slug)->first();
    $feedBack_slug = Illuminate\Support\Str::slug(App\Constants\SiteSectionConst::CLIENT_FEEDBACK_SECTION);
    $feedBack = App\Models\Admin\SiteSections::getData($feedBack_slug)->first();

@endphp
@extends('frontend.layouts.master')

@section('content')
    {{-- <!-- about section -->
     @include('frontend.section.about-us-section')
  

    <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                Start Faq
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
   @include('frontend.section.faq')
    <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                End Faq
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->


    <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                Testimonial section
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->

    
 @include('frontend.section.client-feedback-section')
    <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                End Testimonial section
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--> --}}

    @forelse ($page_section->sections ?? [] as $item)
    {{-- @dd($item->section->key); --}}
        @php
            $component_name = 'frontend.section.' . $item->section->key;
        @endphp

        @if (View::exists($component_name))
            @include($component_name)
        @endif
    @empty
        @include('frontend.section.demo')
    @endforelse
@endsection
