<?php

namespace App\Filament\Resources\UserResource\Pages;

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

class EditUser extends EditRecord
{
    protected static string $resource = UserResource::class;
    protected static bool $canCreateAnother = false;

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

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