@if ($event->id == 19)
{{-- Infinite logo carousel https://codepen.io/Navneet-Dwivedi/pen/LYXbvVL --}}
@endif
@component('frontend.mediknode.components.buttons', ['event' => $event])
@endcomponent
@php
$isEventRegistrationOpen = !$event->is_closed_registration;
$alreadyRegistered = $event->participant($userId, $event->id);
$isAuthenticate = auth()->user();
$hasAbstracts = $event->has_abstracts;
$isEventAbstractOpen = !$event->is_closed_abstract_submission;
$hasProgram = $event->has_program;
$isInternalProgram = $event->is_internal_link_program;
$hasHebergement = $event->has_hebergement;
$canAddAnotherAbstract =
auth()->user() &&
auth()->user()->abstractsByEvents($event->id)->count() < $event->abstract_submission_limit;
$showParticipateButton = $isAuthenticate && $isEventRegistrationOpen && !$alreadyRegistered;
$showParticipateToLandingPageButton = !$isAuthenticate && $isEventRegistrationOpen;
$showAbstractButton =
$isAuthenticate &&
$isEventRegistrationOpen &&
$alreadyRegistered &&
$hasAbstracts &&
$isEventAbstractOpen &&
$canAddAnotherAbstract;
$showAbstractToParticipatePageButton =
$isAuthenticate &&
$isEventRegistrationOpen &&
!$alreadyRegistered &&
$hasAbstracts &&
$isEventAbstractOpen;
$showAbstractToLandingPageButton =
!$isAuthenticate && $isEventRegistrationOpen && $hasAbstracts && $isEventAbstractOpen;
$showInternalProgramButton = $hasProgram && $isInternalProgram;
$showExternalProgramButton = $hasProgram && !$isInternalProgram;
$showHebergementButton = $isEventRegistrationOpen && $hasHebergement;
$alreadyReaRegistered = $event->participant($userId, 40);
@endphp
@if ($event->id != 15 && $event->id != 45 && $event->id != 28 && $event->id != 29 && $event->id != 47)
@if ($alreadyRegistered)
Vous êtes déjà inscrit {{ $event->is_masculin ? 'au' : 'à la' }} «
{!! \App\Helpers\TextHelper::addSup($event->title2) !!}
»
@endif
@if ($showParticipateButton)
@endif
@if ($showParticipateToLandingPageButton)
@endif
@if ($showAbstractButton)
@endif
@if ($showAbstractToLandingPageButton)
@endif
@if ($showAbstractToParticipatePageButton)
@endif
@if ($showInternalProgramButton)
@endif
@if ($showExternalProgramButton)
@endif
@if ($showHebergementButton)
@endif
@if ($event->id == 40 && $alreadyReaRegistered)
@endif
@endif
@if ($event->content)
@endif
{{--
@if ($showParticipateButton)
@endif
@if ($showParticipateToLandingPageButton)
@endif
@if ($alreadyRegistered)
Vous êtes déjà inscrit {{ $event->is_masculin ? 'au' : 'à la' }} «
{{ $event->title }}
»
@endif
@if ($showAbstractButton)
@endif
@if ($showAbstractToLandingPageButton)
@endif
@if ($showAbstractToParticipatePageButton)
@endif
@if ($showInternalProgramButton)
@endif
@if ($showExternalProgramButton)
@endif
@if ($showHebergementButton)
@endif
--}}
@if ($event->id != 15 && $event->id != 45 && $event->id != 28 && $event->id != 29 && $event->id != 47)
@if ($showParticipateButton)
@endif
@if ($showParticipateToLandingPageButton)
@endif
@if ($showAbstractButton)
@endif
@if ($showAbstractToLandingPageButton)
@endif
@if ($showAbstractToParticipatePageButton)
@endif
@if ($showInternalProgramButton)
@endif
@if ($showExternalProgramButton)
@endif
@if ($showHebergementButton)
@endif
@if ($event->id == 40 && $alreadyReaRegistered)
@endif
@if ($alreadyRegistered)
Vous êtes déjà inscrit {{ $event->is_masculin ? 'au' : 'à la' }} «
{!! \App\Helpers\TextHelper::addSup($event->title2) !!}
»
@endif
@endif
@component('frontend.mediknode.components.buttons', ['event' => $event])
@endcomponent