<?php

namespace File\File\Providers;

use Litepie\Contracts\Workflow\Workflow as WorkflowContract;
use Litepie\Foundation\Support\Providers\WorkflowServiceProvider as ServiceProvider;

class WorkflowServiceProvider extends ServiceProvider
{
    /**
     * The validators mappings for the package.
     *
     * @var array
     */
    protected $validators = [
        // Bind Image validator
        \File\File\Models\Image::class => \File\File\Workflow\ImageValidator::class,
        // Bind Video validator
        \File\File\Models\Video::class => \File\File\Workflow\VideoValidator::class,
        // Bind Auteur validator
        \File\File\Models\Auteur::class => \File\File\Workflow\AuteurValidator::class,
    ];

    /**
     * The actions mappings for the package.
     *
     * @var array
     */
    protected $actions = [
        // Bind Image actions
        \File\File\Models\Image::class => \File\File\Workflow\ImageAction::class,
        // Bind Video actions
        \File\File\Models\Video::class => \File\File\Workflow\VideoAction::class,
        // Bind Auteur actions
        \File\File\Models\Auteur::class => \File\File\Workflow\AuteurAction::class,
    ];

    /**
     * The notifiers mappings for the package.
     *
     * @var array
     */
    protected $notifiers = [
       // Bind Image notifiers
        \File\File\Models\Image::class => \File\File\Workflow\ImageNotifier::class,
        // Bind Video notifiers
        \File\File\Models\Video::class => \File\File\Workflow\VideoNotifier::class,
        // Bind Auteur notifiers
        \File\File\Models\Auteur::class => \File\File\Workflow\AuteurNotifier::class,
    ];

    /**
     * Register any package workflow validation services.
     *
     * @param \Litepie\Contracts\Workflow\Workflow $workflow
     *
     * @return void
     */
    public function boot(WorkflowContract $workflow)
    {
        parent::registerValidators($workflow);
        parent::registerActions($workflow);
        parent::registerNotifiers($workflow);
    }
}