{% set kibana__tpl_dependent_configuration = {} %}
{% if (kibana__register_dependent_config|d() and kibana__register_dependent_config.content|d()) %}
{%   set _ = kibana__tpl_dependent_configuration.update(kibana__register_dependent_config.content | b64decode | trim | from_json) %}
{% endif %}
{% if kibana__dependent_role|d() %}
{%   if kibana__dependent_state == 'present' %}
{%     set _ = kibana__tpl_dependent_configuration.update({kibana__dependent_role: kibana__dependent_configuration}) %}
{%   elif kibana__dependent_state == 'absent' %}
{%     set _ = kibana__tpl_dependent_configuration.pop(kibana__dependent_role, None) %}
{%   endif %}
{% endif %}
{% set kibana__tpl_output = [] %}
{% for key, value in kibana__tpl_dependent_configuration.items() %}
{%   set _ = kibana__tpl_output.append(value) %}
{% endfor %}
{{ kibana__tpl_output | to_yaml }}
