<?php
$widgets = getActingUser()->getSettings('widgets');

if (empty($widgets))
    $widgets = settings('widgets');
?>

@if( ! empty($widgets['status']) && ! empty($widgets['list']) )
    <?php
    if ( ! settings('main_settings.streetview_key') && (settings('main_settings.streetview_api') != 'default') && ($key = array_search('streetview', $widgets['list']))) {
        unset($widgets['list'][$key]);
    }
    ?>
    <div id="widgets" style="display: none;">
        <a class="btn-collapse" onclick="app.changeSetting('toggleWidgets');"><i></i></a>

        <div class="widgets-content">
            @foreach( $widgets['list'] as $widget)
                @include('Frontend.Widgets.'.$widget)
            @endforeach
        </div>
    </div>
@endif
