<?php

declare (strict_types=1);
namespace idoit\Module\SyneticsJdisc\Graphql\Schema\UnionResolveType;

use GraphQL\Type\Definition\ResolveInfo;
use Axtiva\FlexibleGraphql\Resolver\UnionResolveTypeInterface;
use idoit\Module\SyneticsJdisc\Graphql\Schema\Model\DatabaseIdBasedReportActionType;
use idoit\Module\SyneticsJdisc\Graphql\Schema\Model\OpenReportWithFilterActionType;
use idoit\Module\SyneticsJdisc\Graphql\Schema\Model\OpenReportWithFilterSingleSelectActionType;
use idoit\Module\SyneticsJdisc\Graphql\Schema\Model\ReportActionType;
use idoit\Module\SyneticsJdisc\Graphql\Schema\Model\SeparatorActionType;
use idoit\Module\SyneticsJdisc\Graphql\Schema\Model\CreateDiagramActionType;

/**
 * This code is @generated by axtiva/flexible-graphql-php
 * and will be regenerated. Do not edit it manually
 */
final class ReportActionInterfaceTypeResolver implements UnionResolveTypeInterface
{
    public function __invoke($model, $context, ResolveInfo $info)
    {
        if (isset($model)) {
            switch (get_class($model)) {
                case DatabaseIdBasedReportActionType::class:
                    return $info->schema->getType('DatabaseIdBasedReportAction');
                case OpenReportWithFilterActionType::class:
                    return $info->schema->getType('OpenReportWithFilterAction');
                case OpenReportWithFilterSingleSelectActionType::class:
                    return $info->schema->getType('OpenReportWithFilterSingleSelectAction');
                case ReportActionType::class:
                    return $info->schema->getType('ReportAction');
                case SeparatorActionType::class:
                    return $info->schema->getType('SeparatorAction');
                case CreateDiagramActionType::class:
                    return $info->schema->getType('CreateDiagramAction');
            }
        }
        return null;
    }
}