{{-- format-ignore-start --}} @props([ 'status' => 'pending', 'date' => '', 'dateCss' => '', 'label' => '', 'content' => '', 'last' => false, 'avatar' => '', 'avatarCss' => '', 'alignLeft' => false, ]) @aware([ 'stacked' => config('bladewind.timeline.stacked', false), 'completed' => false, 'color' => 'gray', 'anchor' => 'small', 'anchorCss' => '', 'icon' => '', 'iconCss' => '', 'dateCss' => '', 'position' => 'center', ]) @php $stacked = parseBladewindVariable($stacked); $completed = parseBladewindVariable($completed); $completed = ($status !== 'pending') || $completed; $last = parseBladewindVariable($last); $alignLeft = parseBladewindVariable($alignLeft); $content = (!empty($label)) ? $label : $content; $anchor_size_css = ($anchor == 'big') ? "h-8 w-8" : "h-3 w-3"; $anchorCss = sprintf('%s ' .(($completed) ? "bg-$color-500 " : "border-2 border-$color-500/50 "), $anchor_size_css); $content_css = ($stacked) ? 'pt-0 pb-6' : (($anchor=='big') ? 'pt-2 pb-10' : 'pb-6'); $dateCss = (($stacked) ? 'pt-0 ' : (($anchor=='big') ? 'pt-2.5 ' : '')) . $dateCss; $icon = ($completed && $anchor == 'big' && empty($icon)) ? 'check' : $icon; $iconCss = (($completed && $anchor == 'big') ? 'text-white ' : "!text-$color-500 opacity-70 ") . $iconCss; if(!empty($avatar)) $anchor = "big"; @endphp {{-- format-ignore-end --}}
@if(!$stacked || ($stacked && $alignLeft))
{!! $date !!}
@if($alignLeft)
{!! $content !!}
@endif @endif
@if(!empty($avatar)) @elseif(!empty($icon)) @endif
@if(!$last)
@endif
@if(!$alignLeft) @if($stacked)
{!! $date !!}
@endif
{!! $content !!}
@endif