@props(['block']) @php /** @var \App\Models\PageBlock $block */ use Illuminate\Support\Carbon; $c = $block->content ?? []; $rawTarget = data_get($c, 'target_datetime'); try { $targetMs = $rawTarget ? (int) (Carbon::parse($rawTarget)->getTimestamp() * 1000) : 0; } catch (\Throwable) { $targetMs = 0; } $title = data_get($c, 'title'); $expiredAction = (string) data_get($c, 'expired_action', 'hide'); $expiredMessage = (string) data_get($c, 'expired_message', ''); $style = (string) data_get($c, 'style', 'large'); $showLabels = filter_var(data_get($c, 'show_labels', true), FILTER_VALIDATE_BOOLEAN); $labels = data_get($c, 'labels', []); $labelsArr = is_array($labels) ? $labels : []; $gridClass = $style === 'compact' ? 'gap-2 px-2 py-3 sm:gap-3 sm:px-3' : 'gap-3 px-3 py-4 sm:gap-4 sm:px-4 sm:py-5'; $numClass = $style === 'compact' ? 'text-xl sm:text-2xl' : 'text-2xl sm:text-3xl'; @endphp @if ($targetMs > 0)
@if (filled($title))

{{ $title }}

@endif
@if ($showLabels)
@endif
@if ($showLabels)
@endif
@if ($showLabels)
@endif
@if ($showLabels)
@endif

@endif