<?php

namespace App\Filament\Tenant\Resources\InjectorProtocolResource\Pages;

use App\Filament\Tenant\Resources\InjectorProtocolResource;
use App\Models\Tenant\InjectorProtocol;
use Filament\Actions;
use Filament\Resources\Pages\EditRecord;

class EditInjectorProtocol extends EditRecord
{
    protected static string $resource = InjectorProtocolResource::class;

    protected function getHeaderActions(): array
    {
        return [
            Actions\Action::make('pdf')
                ->label(__('Descarcă PDF'))
                ->icon('heroicon-m-document-arrow-down')
                ->color('gray')
                ->url(fn (InjectorProtocol $record) => route('tenant.injector-protocols.pdf', ['record' => $record->id]))
                ->openUrlInNewTab(),
            Actions\DeleteAction::make(),
        ];
    }
}
