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

export const metadata: Metadata = {
  title: '农事操作管理 - Crop-X 智慧农业管理系统',
  description: '农事操作管理系统主页面',
}

export default function FarmingOperationPage() {
  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="/farming-operation/planning"
            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="/farming-operation/task"
            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="/farming-operation/execution"
            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="/farming-operation/calendar"
            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="/farming-operation/archive"
            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>

          <Link
            href="/farming-operation/knowledge"
            className="block p-4 bg-indigo-50 rounded-lg hover:bg-indigo-100 transition-colors"
          >
            <h3 className="font-semibold text-indigo-900 mb-2">
              📚 农事知识库
            </h3>
            <p className="text-indigo-700 text-sm">
              知识管理、分类和搜索
            </p>
          </Link>

          <Link
            href="/farming-operation/performance"
            className="block p-4 bg-pink-50 rounded-lg hover:bg-pink-100 transition-colors"
          >
            <h3 className="font-semibold text-pink-900 mb-2">
              📊 绩效管理
            </h3>
            <p className="text-pink-700 text-sm">
              员工绩效、工时统计和调度
            </p>
          </Link>

          <Link
            href="/farming-operation/issue"
            className="block p-4 bg-red-50 rounded-lg hover:bg-red-100 transition-colors"
          >
            <h3 className="font-semibold text-red-900 mb-2">
              🤝 农事问题协同
            </h3>
            <p className="text-red-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">86 项</span>
            </div>
            <div className="flex justify-between items-center">
              <span className="text-gray-600">进行中任务</span>
              <span className="text-blue-600 font-semibold">23 项</span>
            </div>
            <div className="flex justify-between items-center">
              <span className="text-gray-600">已完成任务</span>
              <span className="text-purple-600 font-semibold">156 项</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>
  )
}