'use client';

import React from 'react';
import { Card } from '@/components/ui/card';
import { Label } from '@/components/ui/label';
import { Enterprise } from '../types';

interface SystemInfoProps {
  enterprise: Enterprise;
}

export function SystemInfo({ enterprise }: SystemInfoProps) {
  return (
    <Card className="p-6">
      <h3 className="mb-6 pb-4 border-b">系统信息</h3>
      <div className="grid grid-cols-2 md:grid-cols-4 gap-6">
        <div>
          <Label>企业ID</Label>
          <div className="field-value">
            <code className="text-xs font-mono">{enterprise.id}</code>
          </div>
        </div>
        <div>
          <Label>注册时间</Label>
          <div className="field-value">
            {new Date(enterprise.createdAt).toLocaleString('zh-CN')}
          </div>
        </div>
        <div>
          <Label>最后更新</Label>
          <div className="field-value">
            {new Date(enterprise.updatedAt).toLocaleString('zh-CN')}
          </div>
        </div>
        {enterprise.auditor && (
          <div>
            <Label>审核人</Label>
            <div className="field-value">{enterprise.auditor}</div>
          </div>
        )}
      </div>
    </Card>
  );
}