<?php

namespace App\Filament\Resources\GroupResource\Pages;

use App\Filament\Resources\GroupResource;
use Filament\Actions;
use Filament\Resources\Pages\EditRecord;

class EditGroup extends EditRecord
{
    protected static string $resource = GroupResource::class;

    protected static ?string $title = '编辑分组';

    protected function getHeaderActions(): array
    {
        return [
            Actions\DeleteAction::make()
                ->label('删除')
                ->modalHeading('删除分组')
                ->modalDescription('确定要删除此分组吗？此操作无法撤销。')
                ->modalSubmitActionLabel('确认删除')
                ->modalCancelActionLabel('取消'),
        ];
    }

    protected function getSavedNotificationTitle(): ?string
    {
        return '分组更新成功';
    }
}
