import { QuestionResponse } from "@/api/types";
import { Pressable, StyleSheet } from "react-native";
import Panel from "./ui/panel";
import { ThemedText } from "./ui/themed-text";

interface QuestionProps {
  question: QuestionResponse;
  onPress?: () => void;
}

const Question = ({ question, onPress }: QuestionProps) => {
  return (
    <Pressable onPress={onPress}>
      <Panel>
        <ThemedText style={styles.questionTitle}>{question.title}</ThemedText>
        <ThemedText>{question.description}</ThemedText>
      </Panel>
    </Pressable>
  )
}

const styles = StyleSheet.create({
  questionTitle: {
    fontSize: 18,
    fontWeight: "600",
    marginBottom: 10
  },
});



export default Question;