import { Card } from '@/components/ui/card'
import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label'
import { SystemSettings } from '@/types/system-params'

interface PlatformInfoCardProps {
  settings: SystemSettings
  onSettingsChange: (updates: Partial<SystemSettings>) => void
}

export function PlatformInfoCard({ settings, onSettingsChange }: PlatformInfoCardProps) {
  return (
    <Card className="p-6">
      <h3 className="mb-4">平台信息</h3>
      <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
        <div>
          <Label>平台名称 *</Label>
          <Input
            value={settings.platformName}
            onChange={(e) => onSettingsChange({ platformName: e.target.value })}
            placeholder="请输入平台名称"
          />
        </div>
        <div>
          <Label>公司名称</Label>
          <Input
            value={settings.companyName || ''}
            onChange={(e) => onSettingsChange({ companyName: e.target.value })}
            placeholder="请输入公司名称"
          />
        </div>
        <div>
          <Label>联系邮箱</Label>
          <Input
            type="email"
            value={settings.contactEmail || ''}
            onChange={(e) => onSettingsChange({ contactEmail: e.target.value })}
            placeholder="support@example.com"
          />
        </div>
        <div>
          <Label>联系电话</Label>
          <Input
            value={settings.contactPhone || ''}
            onChange={(e) => onSettingsChange({ contactPhone: e.target.value })}
            placeholder="400-888-8888"
          />
        </div>
        <div className="md:col-span-2">
          <Label>公司地址</Label>
          <Input
            value={settings.address || ''}
            onChange={(e) => onSettingsChange({ address: e.target.value })}
            placeholder="请输入公司地址"
          />
        </div>
      </div>
    </Card>
  )
}