import React, { ReactNode } from 'react'
import { containerMaxW } from '../config'
import Logo from './Logo'

type Props = {
  children?: ReactNode
}

export default function FooterBar({ children }: Props) {
  const year = new Date().getFullYear()

  return (
    <footer className={`py-3 px-6 ${containerMaxW}`}>
      <div className="block md:flex items-center justify-between gap-4">
        <div className="text-center md:text-left mb-4 md:mb-0 text-sm text-slate-600 dark:text-slate-300">
          <b className='text-slate-900 dark:text-white'>&copy; {year} DakikTabela.</b>{' '}
          {children || 'Satış, üretim ve etkinlik operasyonları tek platformda.'}
        </div>

        <div className="flex items-center justify-center md:justify-end gap-3">
          <Logo className="w-auto h-10 md:h-8" />
        </div>
      </div>
    </footer>
  )
}
