<?php

declare(strict_types=1);

namespace App\Filament\Resources\DberpPurchaseInquiryQuotes\Pages;

use App\Business\Purchase\PurchaseInquiryQuoteService;
use App\Filament\Resources\DberpPurchaseInquiryQuotes\DberpPurchaseInquiryQuoteResource;
use App\Filament\Resources\Pages\CreateRecord;
use Illuminate\Database\Eloquent\Model;

class CreateDberpPurchaseInquiryQuote extends CreateRecord
{
    protected static string $resource = DberpPurchaseInquiryQuoteResource::class;

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