import { View, Text, StyleSheet, Pressable } from "react-native";
import React from "react";
import { Palette, Style } from "../../../styles";
import { FONT_FAMILY } from "../../../styles/Fonts";

const CardContainer = ({ children, label = "", onPress }) => {
  return (
    <View style={{ gap: 12 }}>
      <View style={{ ...Style.containerSpaceBetween }}>
        <Text style={styles.label}>{label}</Text>
        <Pressable onPress={onPress}>
          <Text style={styles.seeAll}>Voir tout</Text>
        </Pressable>
      </View>
      {children}
    </View>
  );
};

export default CardContainer;

const styles = StyleSheet.create({
  label: {
    fontSize: 22,
    color: Palette.white,
    fontFamily: FONT_FAMILY.InterSemiBold,
  },
  seeAll: {
    fontSize: 12,
    color: Palette.gray,
    fontFamily: FONT_FAMILY.InterRegular,
  },
});
