import { ReactNode } from 'react'
import { logout } from '@/app/actions/auth'

export default function AdminLayout({ children }: { children: ReactNode }) {
  return (
    <div className="min-h-screen bg-cream flex flex-col" style={{ backgroundColor: '#F5F0E8' }}>
      <header className="bg-coffee-dark px-6 py-4 flex justify-between items-center" style={{ backgroundColor: '#3D2B1F' }}>
        <h1 className="text-xl font-display font-bold text-cream" style={{ color: '#F5F0E8' }}>Kozmos Yönetim</h1>
        
        <form action={logout}>
          <button
            type="submit"
            className="px-4 py-1.5 rounded bg-cream/10 text-cream text-sm font-medium hover:bg-cream/20 transition-colors"
          >
            Çıkış Yap
          </button>
        </form>
      </header>
      
      <main className="flex-1 p-4 md:p-6 lg:p-8 max-w-5xl mx-auto w-full">
        {children}
      </main>
    </div>
  )
}
