<?php

declare (strict_types=1);
namespace idoit\Module\SyneticsJdisc\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 JTableStateInput
 * The table state * @property null|iterable|string[] $columnOrder = null The column order
 * @property null|string $columnWidths = null The widths of the columns
 * @property null|string $filters = null The filters metadata
 * @property null|iterable|string[] $hiddenColumns = null The hidden columns
 * @property null|InstanceStateInputInputType $instanceState = null State related to a particular table instance id
 * @property null|iterable|MultiSortMetaInputInputType[] $multiSortMeta = null The multi sort metadata
 * @property null|SearchConfigurationInputInputType $searchConfig = null The searchConfig
 * @property null|string $sortField = null The single sort field
 * @property null|int $sortOrder = null The single sort order
 * @property null|string $tableWidth = null The width of the table
 */
final class JTableStateInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

        if ($name === 'instanceState') {
            return new InstanceStateInputInputType($value);
        }

        if ($name === 'multiSortMeta') {
            return (function($value) {foreach($value as $v) yield ($v === null ? null : new MultiSortMetaInputInputType($v)); })($value);
        }

        if ($name === 'searchConfig') {
            return new SearchConfigurationInputInputType($value);
        }

        return $value;
    }
}