<?php

declare (strict_types=1);
namespace idoit\Module\JDisc\Graphql\Schema\Model;

use Axtiva\FlexibleGraphql\Type\InputType;

/**
 * This code is @generated by axtiva/flexible-graphql-php do not edit it
 * PHP representation of graphql type ContextMenuItemInput
 * A context menu item * @property null|ContextMenuGroupEnum $group = null The context menu group in which the item is assigned to
 * @property null|IconKeyEnum $iconKey = null The context menu item icon key
 * @property null|ContextMenuItemKeyEnum $key = null The context menu item key
 * @property null|ContextMenuGroupEnum $parentGroup = null The context menu parent group in which the item is assigned to
 */
final class ContextMenuItemInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

        if ($name === 'group') {
            return new ContextMenuGroupEnum($value);
        }

        if ($name === 'iconKey') {
            return new IconKeyEnum($value);
        }

        if ($name === 'key') {
            return new ContextMenuItemKeyEnum($value);
        }

        if ($name === 'parentGroup') {
            return new ContextMenuGroupEnum($value);
        }

        return $value;
    }
}