{% macro configWarning(setting, file) -%}
    {%- set configArray = craft.app.config.getConfigFromFile(file) -%}
    {%- if vuiGetValue(configArray, setting) is not null -%}
        {{- "This is being overridden by the `#{setting}` setting in the `config/#{file}.php` file." |raw }}
    {%- else -%}
        {{ false }}
    {%- endif -%}
{%- endmacro %}

{% macro proxyField(variables, type, config) %}
    {# Extract the type of field we want to render #}
    {% if config.instructions is defined %}
        {% set instructions = config.instructions | t(variables.plugin, variables | merge({
            label: config.label,
        })) %}

        {% set config = config | merge({ instructions: instructions }) %}
    {% endif %}

    {# Dynamically calling a macro isn't techncically supported, but this is a way around that! #}
    {% set tmplString = "{% import '_includes/forms' as forms %}{{ forms.#{type}(config) }}" %}

    {{ include(template_from_string(tmplString), { config: config }) }}
{% endmacro %}
