<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;

$__newAttributes = [];
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['title' => 'FX ZIDII', 'greeting' => null]));

foreach ($attributes->all() as $__key => $__value) {
    if (in_array($__key, $__propNames)) {
        $$__key = $$__key ?? $__value;
    } else {
        $__newAttributes[$__key] = $__value;
    }
}

$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);

unset($__propNames);
unset($__newAttributes);

foreach (array_filter((['title' => 'FX ZIDII', 'greeting' => null]), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
    $$__key = $$__key ?? $__value;
}

$__defined_vars = get_defined_vars();

foreach ($attributes->all() as $__key => $__value) {
    if (array_key_exists($__key, $__defined_vars)) unset($$__key);
}

unset($__defined_vars, $__key, $__value); ?>

<?php
	$hour = (int) now()->format('H');
	$resolvedGreeting = $greeting ?? match (true) {
		$hour < 5 => __('Good Night'),
		$hour < 12 => __('Good Morning'),
		$hour < 17 => __('Good Afternoon'),
		$hour < 21 => __('Good Evening'),
		default => __('Good Night'),
	};
?>

<header
	x-data="{ scrolled: false }"
	x-init="scrolled = window.scrollY > 6; window.addEventListener('scroll', () => scrolled = window.scrollY > 6)"
	:class="scrolled ? 'bg-zinc-950 border-zinc-800' : 'bg-background border-border/80'"
	class="sticky top-0 z-40 border-b px-4 py-3 transition-colors duration-200">
	<div class="flex items-center justify-between gap-3">
		<div class="min-w-0">
			<h1 class="truncate font-display text-lg font-bold text-foreground sm:text-xl"><?php echo e(config('app.name', $title)); ?></h1>
			<p class="truncate text-sm font-medium text-muted-foreground"><?php echo e($resolvedGreeting); ?></p>
		</div>
		<div class="flex items-center gap-3">
			<a href="<?php echo e(route('logout')); ?>" class="inline-flex items-center text-sm text-white transition-opacity hover:opacity-80"
				aria-label="<?php echo e(__('Log out')); ?>"
				onclick="event.preventDefault(); document.getElementById('logout-form-trading').submit();">
				<i class="fa-solid fa-right-from-bracket h-6 w-6 text-white"></i>
			</a>
			<form id="logout-form-trading" action="<?php echo e(route('logout')); ?>" method="POST" class="hidden">
				<?php echo csrf_field(); ?>
			</form>
		</div>
	</div>
</header>
<?php /**PATH /home/ziidiaik/home.ziiditrader.com/resources/views/partials/trading/topbar.blade.php ENDPATH**/ ?>