<% if webhook_event.status == 'success' %>
<%= svg_icon('check', class: 'w-4 h-4 shrink-0 stroke-2') %> <%= webhook_event.webhook_attempts.max_by(&:id)&.response_status_code if local_assigns[:with_status] %>
<% elsif webhook_event.status == 'pending' %>
<%= svg_icon('clock', class: 'w-4 h-4 shrink-0 stroke-2') %> <%= webhook_event.webhook_attempts.max_by(&:id)&.response_status_code if local_assigns[:with_status] %>
<% elsif webhook_event.status == 'error' %>
<%= svg_icon('x', class: 'w-4 h-4 shrink-0') %> <%= webhook_event.webhook_attempts.max_by(&:id)&.response_status_code if local_assigns[:with_status] %>
<% end %>
<%= webhook_event.event_type %>
<%= button_to button_title(title: t('resend'), disabled_with: t('awaiting'), icon: svg_icon('rotate', class: 'w-4 h-4'), icon_disabled: svg_icon('loader', class: 'w-4 h-4 animate-spin')), resend_settings_webhook_event_path(webhook_url.id, webhook_event.uuid), form: { id: button_uuid = SecureRandom.uuid }, params: { button_id: button_uuid }, class: 'btn btn-neutral btn-xs h-2 text-white relative z-[1] hidden md:group-hover:inline-block', data: { turbo_frame: :drawer }, method: :post, onclick: "[this.form.requestSubmit(), this.disabled = true, this.classList.remove('hidden')]" %> <%= l(webhook_event.created_at, locale: current_account.locale, format: :short) %>