<?php

namespace App\Filament\Resources\PosSaleResource\Pages;

use App\Filament\Resources\PosSaleResource;
use Filament\Actions;
use Filament\Resources\Pages\ViewRecord;

class ViewPosSale extends ViewRecord
{
    protected static string $resource = PosSaleResource::class;

    protected function getHeaderActions(): array
    {
        return [
            Actions\Action::make('print')
                ->label('Print Receipt')
                ->icon('heroicon-o-printer')
                ->url(fn () => route('pos.receipts.print', $this->record))
                ->openUrlInNewTab(),
        ];
    }
}
