<?php

namespace App\Http\Requests\Admin\ProductConfigOption;

use App\Models\ProductConfigOption;
use Illuminate\Foundation\Http\FormRequest;

class RestoreOptionRequest extends FormRequest
{
    public function authorize(): bool
    {
        $option = ProductConfigOption::findOrFail($this->route('id'));
        $this->merge(['_option' => $option]);
        return $this->user('admin')?->can('restore', $option) ?? false;
    }

    public function rules(): array
    {
        return [];
    }
}
