import React from "react";
import { SafeAreaView } from "react-native-safe-area-context";
import { View, StyleSheet, TouchableOpacity, Image } from "react-native";
import FoodWasteAnalytics from "@/components/analytics/FoodWasteAnalytics";
import Text from "@/components/common/Text";
import { router } from "expo-router";

export default function FoodAnalyticsScreen() {
  return (
    <SafeAreaView style={styles.container}>
      <View style={styles.header}>
        <TouchableOpacity style={styles.backBtn} onPress={() => router.back()}>
          <Image
            source={require("@/assets/images/icons/back-button.png")}
            style={styles.backIcon}
            resizeMode="contain"
          />
        </TouchableOpacity>
        <Text style={styles.title}>Gıda İsrafı Analizleri</Text>
        <View style={{ width: 40 }} />
      </View>
      <FoodWasteAnalytics />
    </SafeAreaView>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: "#FFF",
  },
  header: {
    flexDirection: "row",
    alignItems: "center",
    justifyContent: "space-between",
    paddingHorizontal: 16,
    paddingVertical: 12,
  },
  backBtn: {
    width: 40,
    height: 40,
    alignItems: "center",
    justifyContent: "center",
  },
  backIcon: {
    width: 24,
    height: 24,
  },
  title: {
    fontFamily: "Rubik",
    fontSize: 18,
    fontWeight: "700",
    color: "#52000C",
  },
});


