@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="form-input !min-h-[45px] !py-0 !text-sm w-auto border-border-medium rounded bg-white">
    <button type="submit" class="btn-primary !h-[45px] !px-4 text-sm rounded shadow-sm hover:translate-y-[-1px] sm:hidden">Lọc</button>
</form>
