"use client"

import { useLocale } from "@/lib/i18n/context"
import { Button } from "@/components/ui/button"
import { Globe } from "lucide-react"

export function LocaleSwitcher() {
  const { locale, toggleLocale } = useLocale()

  return (
    <Button
      variant="ghost"
      size="sm"
      onClick={toggleLocale}
      className="gap-1.5 text-muted-foreground hover:text-foreground"
    >
      <Globe className="h-4 w-4" />
      <span className="text-xs font-medium uppercase">{locale === "tr" ? "EN" : "TR"}</span>
    </Button>
  )
}
