@props([ 'status' => 'pending', 'date' => '', 'date_css' => '', 'label' => '', 'content' => '', 'last' => false, 'avatar' => '', 'avatar_css' => '', 'align_left' => false, ]) @aware([ 'stacked' => config('bladewind.timeline.stacked', false), 'completed' => false, 'color' => 'gray', 'anchor' => 'small', 'anchor_css' => '', 'icon' => '', 'icon_css' => '', 'date_css' => '', 'position' => 'center', ]) @php $stacked = parseBladewindVariable($stacked); $completed = parseBladewindVariable($completed); $completed = ($status !== 'pending') || $completed; $last = parseBladewindVariable($last); $align_left = parseBladewindVariable($align_left); $content = (!empty($label)) ? $label : $content; $anchor_size_css = ($anchor == 'big') ? "h-8 w-8" : "h-3 w-3"; $anchor_css = 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'); $date_css = (($stacked) ? 'pt-0 ' : (($anchor=='big') ? 'pt-2.5 ' : '')) . $date_css; $icon = ($completed && $anchor == 'big' && empty($icon)) ? 'check' : $icon; $icon_css = (($completed && $anchor == 'big') ? 'text-white ' : "!text-$color-500 opacity-70 ") . $icon_css; if(!empty($avatar)) $anchor = "big"; @endphp