<?php

declare(strict_types=1);

namespace App\Filament\Resources\DberpSalesQuotes\Pages;

use App\Business\Sales\SalesQuoteService;
use App\Filament\Resources\DberpSalesQuotes\DberpSalesQuoteResource;
use App\Filament\Resources\Pages\CreateRecord;
use Illuminate\Database\Eloquent\Model;

class CreateDberpSalesQuote extends CreateRecord
{
    protected static string $resource = DberpSalesQuoteResource::class;

    /**
     * @param  array<string, mixed>  $data
     */
    protected function handleRecordCreation(array $data): Model
    {
        return app(SalesQuoteService::class)->createQuote($data);
    }
}