<?php

namespace App\Modules\Inventory\Controllers;

use App\Http\Controllers\Controller;
use App\Modules\Inventory\Models\InventoryAttribute;
use App\Modules\Inventory\Repositories\InventoryAttributeRepository;
use Illuminate\View\View;

class InventoryAttributePageController extends Controller
{
    public function __construct(
        private readonly InventoryAttributeRepository $attributes,
    ) {}

    public function index(): View
    {
        $this->authorize('viewAny', InventoryAttribute::class);

        return view('pages.inventory.attributes.index', [
            'attributes' => $this->attributes->paginatedWithOptionsCount(),
        ]);
    }
}
