'use client'

import type { ReactNode } from 'react'
import AdminSidebar from './AdminSidebar'

type AdminShellProps = {
  title: string
  subtitle?: string
  actions?: ReactNode
  children: ReactNode
}

export default function AdminShell({ title, subtitle, actions, children }: AdminShellProps) {
  return (
    <div className="admin-shell">
      <aside className="admin-shell-nav">
        <AdminSidebar />
      </aside>
      <main className="card admin-card">
        <div className="admin-header">
          <div>
            <h1>{title}</h1>
            {subtitle && <p className="lede">{subtitle}</p>}
          </div>
          {actions}
        </div>
        {children}
      </main>
    </div>
  )
}
