@php
if ($panel != 'none' && $panel) {
    if ($panel == 'decor') {
        $fields = [
            1 => ['title', 'links', 'see_all'],
        ];
    } else {
        $fields = [
            1 => ['title', 'links', 'see_all'],
            2 => ['title', 'links', 'see_all'],
            3 => ['title', 'links', 'see_all'],
        ];
    }
}

if ($fields) {
    foreach ($fields as $key => $menu) {
        foreach ($menu as $field) {
            $data[$key][$field] = get_field($panel . '_' . $key . '_' . $field, 'option');
        }
    }
}

@endphp

    <div data-id="{!! $menu_id !!}" class="header-panel {!! $panel !!}">
        <button class="close button arrow">
            @svg('images/arrow-left.svg')
            <span>{!! __('Back', 'thor') !!}</span>
        </button>
        <div class="inner">
            <div class="columns">
                @include('partials.panel.panel-link', ['data' => $data])
                @include('partials.panel.panel-decor', ['panel' => $panel])
                @include('partials.panel.panel-teaser', ['data' => $data])
            </div>
        </div>
    </div>
