<?php

namespace App\Filament\Resources\StoreGroupResource\Pages;

use App\Filament\Resources\StoreGroupResource;
use Filament\Actions;
use Filament\Resources\Pages\EditRecord;
use Illuminate\Contracts\Support\Htmlable;
use Illuminate\Support\HtmlString;

class EditStoreGroup extends EditRecord
{
    protected static string $resource = StoreGroupResource::class;

    public function getHeading(): string | Htmlable
    {
        $heading = match (app()->getLocale()) {
            'en' => 'Edit Group',
            default => 'Editar Agrupador',
        };

        return new HtmlString(
            view('filament.module-heading', [
                'icon' => static::$resource::getNavigationIcon(),
                'heading' => $heading,
            ])->render(),
        );
    }

    protected function getHeaderActions(): array
    {
        return [
            Actions\DeleteAction::make(),
        ];
    }
}
