{% set route = route|default('mautic_campaignevent_action') %}

{% if update is not defined %}
<div id="CampaignEvent_{{ event['id'] }}" data-type="{{ event['eventType'] }}" class="draggable list-campaign-event list-campaign-{{ event['eventType'] }} list-campaign-jump" data-event="{{ event['type'] }}" data-event-id="{{ event['id'] }}">
{% endif %}
<div class="campaign-event-type">

<div class="campaign-event-content d-flex fw-nowrap ai-center gap-sm">
    <div class="campaign-event-icon pa-sm mr-5"><i class="{{ getCampaignEventIcon(event['type']) }}"></i></div>

        <span class="fs-18 fw-l">{{ ('mautic.campaign.'~event['type'])|trans }}</span>
        <span class="campaign-event-name label label-primary ellipsis">{% if ('dev' == constant('MAUTIC_ENV')) %}<small>{{ event['id'] }}</small> {% endif %}{{ event['name'] }}</span>
        <a class="label label-primary has-click-event highlight-jump-target ml-sm" href="javascript:void(0)" onClick="Mautic.highlightJumpTarget(event, this)" data-jump-target="{{ event['properties']['jumpToEvent'] }}">
            {{ 'mautic.campaign.locate'|trans }}
            <i class="ri-map-pin-2-line"></i>
        </a>
</div>
</div>
{% if update is not defined %}
<div class="campaign-event-buttons hide">
    {% include '@MauticCore/Helper/button.html.twig' with {
        buttons: [
            {
                href: path(route, {
                    'objectAction': 'edit',
                    'objectId': event['id'],
                    'campaignId': campaignId
                }),
                variant: 'secondary',
                icon: 'ri-pencil-line',
                size: 'xs',
                icon_only: true,
                label: 'mautic.campaign.event.edit.btn.tooltip'|trans,
                attributes: {
                    'data-toggle': 'ajaxmodal',
                    'data-prevent-dismiss': 'true',
                    'data-target': '#CampaignEventModal',
                    'data-method': 'POST',
                    'class': 'btn-edit'
                }
            },
            {
                href: path(route, {
                    'objectAction': 'delete',
                    'objectId': event['id'],
                    'campaignId': campaignId
                }),
                variant: 'primary',
                danger: true,
                icon: 'ri-delete-bin-line',
                size: 'xs',
                icon_only: true,
                label: 'mautic.campaign.event.remove.btn.tooltip'|trans,
                attributes: {
                    'data-toggle': 'ajax-delete',
                    'data-target': 'CampaignEvent_' ~ event['id'],
                    'data-ignore-formexit': 'true',
                    'data-method': 'POST',
                    'data-hide-loadingbar': 'true',
                    'class': 'btn-delete'
                }
            }
        ]
    } %}
</div>

</div>
{% endif %}
