import { Card } from '@/components/ui/card'
import { Textarea } from '@/components/ui/textarea'
import { SystemSettings } from '@/types/system-params'

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

export function SystemAnnouncementCard({ settings, onSettingsChange }: SystemAnnouncementCardProps) {
  return (
    <Card className="p-6">
      <h3 className="mb-4">系统公告</h3>
      <Textarea
        value={settings.systemAnnouncement || ''}
        onChange={(e) => onSettingsChange({ systemAnnouncement: e.target.value })}
        placeholder="输入系统公告内容，将显示在登录页面"
        rows={4}
      />
    </Card>
  )
}