+
+
+ {file ? (
+
+
+
+
+
+
+ {file.file.name}
+
+
+ {(file.file.size / 1024).toFixed(1)} KB
+
+ }
+ className="mt-2"
+ sx={{ alignSelf: { sm: 'flex-start' } }}
+ >
+ {t('remove')}
+
+
+
+ ) : (
+
+
+
+
+
+
+ {isDragActive ? t('dropHere') : t('dragDrop')}
+
+
+ {t('fileFormats')}
+
+
+
+
+ )}
+
+ {error && (
+
+ {error}
+
+ )}
+
+ )
+}
diff --git a/src/views/dashboards/farm/smartFertilization/SmartFertilizationRecommendation.tsx b/src/views/dashboards/farm/smartFertilization/SmartFertilizationRecommendation.tsx
new file mode 100644
index 0000000..053a4d8
--- /dev/null
+++ b/src/views/dashboards/farm/smartFertilization/SmartFertilizationRecommendation.tsx
@@ -0,0 +1,542 @@
+'use client'
+
+import { useState } from 'react'
+import { useTranslations } from 'next-intl'
+import Box from '@mui/material/Box'
+import Card from '@mui/material/Card'
+import CardContent from '@mui/material/CardContent'
+import Typography from '@mui/material/Typography'
+import Button from '@mui/material/Button'
+import Collapse from '@mui/material/Collapse'
+
+// Types
+interface FarmData {
+ soilType: string
+ organicMatter: string
+ waterEC: string
+}
+
+interface GrowthStage {
+ id: string
+ icon: string
+}
+
+interface CropOption {
+ id: string
+ labelKey: string
+ icon: string
+}
+
+interface FertilizationPlan {
+ npkRatio: string
+ amountPerHectare: string
+ applicationMethod: string
+ applicationInterval: string
+ reasoning: string
+}
+
+// Mock farm data (from stored soil/water data - no inputs)
+const DEFAULT_FARM_DATA: FarmData = {
+ soilType: 'Loamy',
+ organicMatter: 'Medium (2.5%)',
+ waterEC: '1.2 dS/m'
+}
+
+const GROWTH_STAGES: GrowthStage[] = [
+ { id: 'prePlanting', icon: 'tabler-seedling' },
+ { id: 'earlyGrowth', icon: 'tabler-leaf' },
+ { id: 'flowering', icon: 'tabler-flower' },
+ { id: 'fruiting', icon: 'tabler-apple' },
+ { id: 'postHarvest', icon: 'tabler-basket' }
+]
+
+const CROP_OPTIONS: CropOption[] = [
+ { id: 'wheat', labelKey: 'wheat', icon: 'tabler-wheat' },
+ { id: 'corn', labelKey: 'corn', icon: 'tabler-plant-2' },
+ { id: 'cotton', labelKey: 'cotton', icon: 'tabler-flower' },
+ { id: 'saffron', labelKey: 'saffron', icon: 'tabler-flower-2' },
+ { id: 'canola', labelKey: 'canola', icon: 'tabler-leaf' },
+ { id: 'vegetables', labelKey: 'vegetables', icon: 'tabler-carrot' }
+]
+
+// Mock plan generator (replace with API in production)
+function generateFertilizationPlan(
+ _cropId: string,
+ _growthStageId: string,
+ _farmData: FarmData
+): FertilizationPlan {
+ return {
+ npkRatio: '20-20-20 (NPK)',
+ amountPerHectare: '150 kg/ha',
+ applicationMethod: 'Foliar spray + soil broadcast',
+ applicationInterval: 'Every 14 days',
+ reasoning:
+ 'Your loamy soil with medium organic matter (2.5%) provides good nutrient retention. Water EC of 1.2 dS/m indicates low salinity—suitable for most crops. At the flowering stage, increased phosphorus supports bloom development. We recommend a balanced NPK to maintain nitrogen for vegetative growth while boosting phosphorous for flowering.'
+ }
+}
+
+export default function SmartFertilizationRecommendation() {
+ const t = useTranslations('fertilization')
+ const [farmData] = useState