<?php

namespace $CLASS_NAMESPACE$;

use App\Http\Controllers\BaseCrudController;
use Modules\$MODULE$\Repositories\Contracts\$MODULE$RepositoryInterface;
use Modules\$MODULE$\Entities\$MODULE$;
use Modules\$MODULE$\Transformers\$MODULE$Resource;
use Modules\$MODULE$\Http\Requests\$MODULE$Request;
use Illuminate\Http\JsonResponse;

class $CLASS$ extends BaseCrudController
{
    protected $modelClass = $MODULE$::class;
    protected $resourceClass = $MODULE$Resource::class;
    protected $requestClass = $MODULE$Request::class;
    protected $resourceName = '$LOWER_NAME$';
    protected $resourceNamePlural = '$LOWER_NAME$s';

    public function __construct($MODULE$RepositoryInterface $repository)
    {
        parent::__construct($repository);
    }

    /**
     * Prepare data for store method
     */
    protected function prepareStoreData(array $validated): array
    {
        return $validated;
    }

    /**
     * Prepare data for update method
     */
    protected function prepareUpdateData(array $validated, $$LOWER_NAME$): array
    {
        return $validated;
    }

    /**
     * Check dependencies before deletion
     */
    protected function checkDependencies($$LOWER_NAME$): ?JsonResponse
    {
        // Add any dependency checks here if needed
        return null;
    }
}
