<?php

namespace App\Filament\Resources\StoreGroupResource\Pages;

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

class CreateStoreGroup extends CreateRecord
{
    protected static string $resource = StoreGroupResource::class;

    protected static bool $canCreateAnother = false;

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

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