<?php

namespace App\Modules\Admin;

use Illuminate\Support\Facades\View;
use Illuminate\Support\Facades\Auth;
use App\Http\Controllers\BaseController;

class EventsController extends BaseController
{
    /**
     *	The layout that should be used for responses.
     */
    protected $layout = 'layouts.master';

    public function index()
    {
        // Check if user has permission to manage events
        // Using fallback to admin group check since this is a placeholder feature
        if (! Auth::user()->isMemberOf([4, 5])) {
            $this->layout->content = View::make('admin::no-permission', [
                'feature' => 'Events Settings',
                'description' => 'You need to be a member of the admin or management group to access this feature.',
                'required_permission' => 'manage_events'
            ]);
            return;
        }

        $this->layout->content = View::make('admin::settings.events');
    }
} 