<?php


namespace App\Form\Providers;


use App\Form\Facades\FormContentFacade;
use App\Form\Facades\FormItemDetailFacade;
use App\Form\Facades\FormItemFacade;
use App\Form\Facades\FormProductDetailFacade;
use App\Form\Facades\FormProductFacade;
use App\Form\Facades\FormRecordFacade;
use App\Form\Models\FormContentModel;
use App\Form\Models\FormItemDetailModel;
use App\Form\Models\FormItemModel;
use App\Form\Models\FormProductDetailModel;
use App\Form\Models\FormProductModel;
use App\Form\Models\FormRecordModel;
use App\Form\Services\FormContentService;
use App\Form\Services\FormInfoService;
use App\Form\Models\FormInfoModel;
use App\Form\Facades\FormInfoFacade;
use App\Form\Services\FormItemDetailService;
use App\Form\Services\FormItemService;
use App\Form\Services\FormProductDetailService;
use App\Form\Services\FormProductService;
use App\Form\Services\FormRecordService;

use App\Providers\EventServiceProvider;

class FormServiceProvider extends EventServiceProvider
{
    public function register()
    {
        $this->app->bind(FormInfoService::class,function(){
            return new FormInfoService(new FormInfoModel);
        });
        $this->app->bind(FormInfoFacade::class,function(){
            return app()->make(FormInfoService::class);
        });

        $this->app->bind(FormItemService::class,function(){
            return new FormItemService(new FormItemModel());
        });
        $this->app->bind(FormItemFacade::class,function(){
            return app()->make(FormItemService::class);
        });

        $this->app->bind(FormItemDetailService::class,function(){
            return new FormItemDetailService(new FormItemDetailModel());
        });
        $this->app->bind(FormItemDetailFacade::class,function(){
            return app()->make(FormItemDetailService::class);
        });

        $this->app->bind(FormContentService::class,function(){
            return new FormContentService(new FormContentModel());
        });
        $this->app->bind(FormContentFacade::class,function(){
            return app()->make(FormContentService::class);
        });

        $this->app->bind(FormRecordService::class, function () {
            return new FormRecordService(new FormRecordModel());
        });
        $this->app->bind(FormRecordFacade::class, function () {
            return app()->make(FormRecordService::class);
        });



        $this->app->bind(FormProductDetailFacade::class, function () {
            return app()->make(FormProductDetailService::class);
        });
        $this->app->bind(FormProductDetailService::class, function () {
            return new FormProductDetailService(new FormProductDetailModel());
        });

        $this->app->bind(FormProductService::class, function () {
            return new FormProductService(new FormProductModel());
        });
        $this->app->bind(FormProductFacade::class, function () {
            return app()->make(FormProductService::class);
        });

    }
}
