/**
 * KRA - Bottom Info Component
 * Footer information display
 */
import React from 'react';

export interface BottomInfoProps {
  className?: string;
  style?: React.CSSProperties;
  children?: React.ReactNode;
}

const BottomInfo: React.FC<BottomInfoProps> = ({ className, style, children }) => {
  return (
    <div
      className={className}
      style={{
        display: 'flex',
        flexDirection: 'column',
        alignItems: 'center',
        justifyContent: 'center',
        gap: 8,
        padding: '16px 0',
        fontSize: 14,
        color: '#666',
        ...style,
      }}
    >
      {children || (
        <>
          <div>
            <span style={{ marginRight: 4 }}>Powered by</span>
            <a
              href="https://github.com/go-kratos/kratos"
              target="_blank"
              rel="noopener noreferrer"
              style={{ fontWeight: 600, color: '#1890ff' }}
            >
              Kratos Admin
            </a>
          </div>
          <div>
            <span style={{ marginRight: 4 }}>Copyright © {new Date().getFullYear()}</span>
            <span>KRA Team</span>
          </div>
        </>
      )}
    </div>
  );
};

export default BottomInfo;
