@props(['mode', 'user' => null, 'selectedMonth'])

@php
    $actionUrl = $mode === 'self' 
        ? route('user.dashboard') 
        : route('admin.users.edit', $user?->msnv);
@endphp

<form action="{{ $actionUrl }}" method="GET" class="flex items-center gap-2 flex-shrink-0">
    <input type="month" name="month" value="{{ $selectedMonth }}" onchange="this.form.submit()" class="w-full sm:w-auto h-[40px] px-4 bg-white border border-[#d9dfe7] rounded-xl outline-none text-text-dark text-sm placeholder-gray-400 focus:border-[#3462f7] focus:ring-2 focus:ring-blue-500/20 hover:border-gray-400 transition-all duration-200 shadow-sm">
    <button type="submit" class="inline-flex items-center justify-center bg-[#3462f7] hover:bg-blue-700 text-white font-bold h-[40px] px-4 rounded-xl text-sm transition-colors shadow-md shadow-blue-500/10 sm:hidden">Lọc</button>
</form>
