{% extends ajax-suffix ? "@gantry-admin/partials/ajax.html.twig" : "@gantry-admin/partials/base.html.twig" %}

{% block gantry %}
<form method="post" action="{{ gantry.route(action) }}">
    <div class="g-tabs">
        <ul>
            <li class="active"><a href="#">{{ 'GANTRY5_PLATFORM_PARTICLE'|trans }}</a></li>
            <li><a href="#">{{ 'GANTRY5_PLATFORM_BLOCK'|trans }}</a></li>
        </ul>
    </div>

    <div class="g-panes">
        <div class="g-pane active">
            <div class="card settings-block">
                <h4>
                    <span data-title-editable="{{ item.title|trim|e }}" class="title">{{ item.title|trim|e }}</span> <i class="fa fa-pencil font-small" data-title-edit></i>
                    <span class="badge font-small">{{ particle.subtype }}</span>
                    {% if particle.form.fields.enabled %}
                    {% include 'forms/fields/enable/enable.html.twig' with {'name': 'particles.' ~ particle.subtype ~ '.enabled', 'field': particle.form.fields.enabled, 'value': item.attributes.enabled, 'default': 1, 'disabled': not gantry.config.get('particles.' ~ particle.subtype ~ '.enabled', true)} %}
                    {% endif %}
                </h4>

                <div class="inner-params">
                    {% include 'forms/fields.html.twig' with {'overrideable': true, 'blueprints': particle.form} %}
                </div>
            </div>
        </div>

        <div class="g-pane">
            <div class="card settings-block">
                <h4>
                    {{ 'GANTRY5_PLATFORM_BLOCK'|trans }}
                </h4>
                <div class="inner-params">
                    {% include 'forms/fields.html.twig' with {'blueprints': extra.form, 'data': {'block': item.block}, 'prefix': 'block.'} %}
                </div>
            </div>
        </div>
    </div>

    <div class="g-modal-actions">
        <button class="button button-primary" type="submit">{{ 'GANTRY5_PLATFORM_APPLY'|trans }}</button>
        <button class="button button-primary" data-apply-and-save>{{ 'GANTRY5_PLATFORM_APPLY_SAVE'|trans }}</button>
        <a class="button g5-dialog-close">{{ 'GANTRY5_PLATFORM_CANCEL'|trans }}</a>
    </div>
</form>
{% endblock %}
