<?php

namespace App\Filament\Resources\InviteLayouts\Pages;

use App\Filament\Resources\InviteLayouts\InviteLayoutResource;
use Filament\Resources\Pages\CreateRecord;
use Illuminate\Support\Facades\Auth;

class CreateInviteLayout extends CreateRecord
{
    protected static string $resource = InviteLayoutResource::class;

    protected function mutateFormDataBeforeCreate(array $data): array
    {
        $data = InviteLayoutResource::normalizePayload($data);
        $data['created_by'] = Auth::id();

        return $data;
    }
}
