38 lines
1.6 KiB
PHP
38 lines
1.6 KiB
PHP
@props([
|
|
'block',
|
|
'page' => null,
|
|
'pageState' => 'active',
|
|
])
|
|
|
|
@php
|
|
/** @var \App\Models\PageBlock $block */
|
|
/** @var \App\Models\PreregistrationPage|null $page */
|
|
$c = $block->content ?? [];
|
|
$url = (string) data_get($c, 'button_url', '#');
|
|
if ($pageState === 'expired' && $page !== null && filled($page->ticketshop_url)) {
|
|
$url = $page->ticketshop_url;
|
|
}
|
|
$btnColor = (string) data_get($c, 'button_color', '#F47B20');
|
|
$style = (string) data_get($c, 'style', 'inline');
|
|
$flexClass = $style === 'stacked' ? 'flex-col gap-3' : 'flex-col gap-3 sm:flex-row sm:items-center sm:justify-between sm:gap-4';
|
|
@endphp
|
|
|
|
<div class="w-full rounded-2xl border border-white/15 bg-black/35 px-4 py-4 sm:px-5" x-show="phase !== 'thanks'" x-cloak>
|
|
<div class="flex {{ $flexClass }}">
|
|
@if (filled(data_get($c, 'text')))
|
|
<p class="text-center text-sm font-medium text-white sm:text-left sm:text-base">{{ data_get($c, 'text') }}</p>
|
|
@endif
|
|
<div class="flex justify-center sm:justify-end">
|
|
<a
|
|
href="{{ e($url) }}"
|
|
class="inline-flex min-h-[48px] items-center justify-center rounded-xl px-6 py-3 text-sm font-bold text-white shadow-lg transition hover:scale-[1.02] hover:brightness-110 focus:outline-none focus:ring-2 focus:ring-white/40"
|
|
style="background-color: {{ e($btnColor) }};"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
>
|
|
{{ data_get($c, 'button_label') }}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|