import { TouchableOpacity, Text, StyleSheet } from "react-native";
import { LIGHT_THEME } from "../const/theme";

interface FloatingEndActionButtonProps {
    onPress: () => void;
    title: string;
}

export const FloatingEndActionButton = ({ onPress, title }: FloatingEndActionButtonProps) => {
  return (
    <TouchableOpacity
      style={styles.generate_route_button}
      activeOpacity={0.8}
      onPress={onPress}
    >
      <Text style={styles.generate_router_button_text}>{title}</Text>
    </TouchableOpacity>
  );
};

const styles = StyleSheet.create({
    generate_route_button: {
        position: "absolute",
        justifyContent: "center",
        alignItems: "center",
        backgroundColor: LIGHT_THEME.color.primary,
        borderRadius: 25,
        bottom: 10,
        width: 200,
        height: 50,
        elevation: 5,
        alignSelf: "center",
      },
      generate_router_button_text: {
        color: LIGHT_THEME.color.white,
        fontWeight: "bold",
      },
});
