<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use Illuminate\View\View;

class PosController extends Controller
{
    public function __construct()
    {
        $this->middleware('auth');
    }

    public function index(): View
    {
        // Check if user has pos_access permission or is admin/staff
        $user = auth()->user();
        if (!$user->can('pos_access') && !$user->isAdmin() && !$user->isStaff()) {
            abort(403, 'You do not have permission to access POS.');
        }
        
        return view('admin.pos.index');
    }
}
