import dayjs from 'dayjs'
import 'dayjs/locale/de'
import { useProfile } from '../../context/ProfileContext'

dayjs.locale('de')

export default function PilotWelcome() {
  const { activeProfile } = useProfile()
  return (
    <div className="card section-gap" style={{ marginBottom: 16 }}>
      <h2 style={{ fontSize: 20, fontWeight: 800, margin: 0, color: 'var(--text1)' }}>
        Hallo, {activeProfile?.name || 'Nutzer'} 👋
      </h2>
      <p style={{ fontSize: 12, color: 'var(--text3)', margin: '6px 0 0' }}>
        {dayjs().format('dddd, DD. MMMM YYYY')} · Pilot-Übersicht
      </p>
    </div>
  )
}
