import Link from 'next/link'
import { Metadata } from 'next'

export const metadata: Metadata = {
  title: '水肥控制 - Crop-X 智慧农业管理系统',
  description: '水肥一体化控制系统主页面',
}

export default function WaterFertilizerControlPage() {
  return (
    <div className="space-y-6">
      <div className="bg-white rounded-lg shadow p-6">
        <h2 className="text-xl font-semibold text-gray-800 mb-4">
          水肥一体化控制系统
        </h2>
        <p className="text-gray-600 mb-6">
          水肥机管理、智能灌溉、施肥配方和实时监测控制
        </p>

        <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
          <Link
            href="/water-fertilizer-control/irrigation-system-management"
            className="block p-4 bg-green-50 rounded-lg hover:bg-green-100 transition-colors"
          >
            <h3 className="font-semibold text-green-900 mb-2">
              🚰 水肥机管理
            </h3>
            <p className="text-green-700 text-sm">
              设备注册和状态监控管理
            </p>
          </Link>

          <Link
            href="/water-fertilizer-control/smart-irrigation"
            className="block p-4 bg-blue-50 rounded-lg hover:bg-blue-100 transition-colors"
          >
            <h3 className="font-semibold text-blue-900 mb-2">
              💦 智能灌溉
            </h3>
            <p className="text-blue-700 text-sm">
              灌溉计划和自动控制管理
            </p>
          </Link>

          <Link
            href="/water-fertilizer-control/fertilizer-formula-management"
            className="block p-4 bg-purple-50 rounded-lg hover:bg-purple-100 transition-colors"
          >
            <h3 className="font-semibold text-purple-900 mb-2">
              🧪 施肥配方管理
            </h3>
            <p className="text-purple-700 text-sm">
              配置管理和作物专用配方
            </p>
          </Link>

          <Link
            href="/water-fertilizer-control/integrated-control"
            className="block p-4 bg-orange-50 rounded-lg hover:bg-orange-100 transition-colors"
          >
            <h3 className="font-semibold text-orange-900 mb-2">
              ⚙️ 水肥一体化控制
            </h3>
            <p className="text-orange-700 text-sm">
              同步控制和精准施用管理
            </p>
          </Link>

          <Link
            href="/water-fertilizer-control/real-time-monitoring"
            className="block p-4 bg-teal-50 rounded-lg hover:bg-teal-100 transition-colors"
          >
            <h3 className="font-semibold text-teal-900 mb-2">
              📊 实时监测与预警
            </h3>
            <p className="text-teal-700 text-sm">
              参数显示和预警系统管理
            </p>
          </Link>
        </div>
      </div>

      <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
        <div className="bg-white rounded-lg shadow p-6">
          <h3 className="text-lg font-semibold text-gray-800 mb-4">
            📊 系统状态
          </h3>
          <div className="space-y-2">
            <div className="flex justify-between items-center">
              <span className="text-gray-600">在线设备</span>
              <span className="text-green-600 font-semibold">18 / 20</span>
            </div>
            <div className="flex justify-between items-center">
              <span className="text-gray-600">今日灌溉量</span>
              <span className="text-blue-600 font-semibold">2,450 m³</span>
            </div>
            <div className="flex justify-between items-center">
              <span className="text-gray-600">施肥次数</span>
              <span className="text-purple-600 font-semibold">8 次</span>
            </div>
          </div>
        </div>

        <div className="bg-white rounded-lg shadow p-6">
          <h3 className="text-lg font-semibold text-gray-800 mb-4">
            🔧 快速操作
          </h3>
          <div className="space-y-2">
            <button className="w-full px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700 transition-colors">
              启动灌溉
            </button>
            <button className="w-full px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors">
              配置施肥
            </button>
            <button className="w-full px-4 py-2 bg-purple-600 text-white rounded hover:bg-purple-700 transition-colors">
              查看数据
            </button>
          </div>
        </div>
      </div>
    </div>
  )
}