"use client";

import type { SessionUser } from "@/lib/session";

const OPEN_EVENT = "admin:open-sidebar";

export function AdminMobileMenuTrigger({ user: _user }: { user: SessionUser }) {
  return (
    <button
      type="button"
      aria-label="Otvori navigaciju"
      onClick={() => {
        window.dispatchEvent(new CustomEvent(OPEN_EVENT));
      }}
      className="flex h-10 w-10 shrink-0 items-center justify-center rounded-full border border-border bg-white text-foreground transition hover:border-primary/40 hover:text-primary lg:hidden"
    >
      <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
        <line x1="3" y1="6" x2="21" y2="6" />
        <line x1="3" y1="12" x2="21" y2="12" />
        <line x1="3" y1="18" x2="21" y2="18" />
      </svg>
    </button>
  );
}
