<?php
/**
 * @package   Essentials YOOtheme Pro 2.2.16 build 0813.1608
 * @author    ZOOlanders https://www.zoolanders.com
 * @copyright Copyright (C) Joolanders, SL
 * @license   http://www.gnu.org/licenses/gpl.html GNU/GPL
 */

namespace ZOOlanders\YOOessentials\Builder;

class SourceTransform
{
    public static function preload(object $node, array &$params)
    {
        if (($params['context'] ?? '') !== 'render') {
            return;
        }

        if (empty($params['source'])) {
            return;
        }

        SourceResolver::resolvePropsQueries((array) ($node->source_extended->props ?? []), $node, $params);
    }
}
