"use client"

/*
 * File: BackButton.tsx
 * Description: Reusable back button component with consistent styling.
 * Design & Developed by Tech4Biz Solutions
 * Copyright (c) Spurrin Innovations. All rights reserved.
 */

import type React from "react"
import { TouchableOpacity, StyleSheet } from "react-native"
import Icon from "react-native-vector-icons/Feather"
import { Colors } from "../../../../shared/src/theme"

interface BackButtonProps {
  onPress: () => void
  style?: any
}

const BackButton: React.FC<BackButtonProps> = ({ onPress, style }) => {
  return (
    <TouchableOpacity style={[styles.backButton, style]} onPress={onPress} activeOpacity={0.7}>
      <Icon name="arrow-left" size={20} color={Colors.textPrimary} />
    </TouchableOpacity>
  )
}

const styles = StyleSheet.create({
  backButton: {
    width: 40,
    height: 40,
    borderRadius: 20,
    backgroundColor: Colors.backButtonBackground,
    justifyContent: "center",
    alignItems: "center",
    shadowColor: Colors.backButtonShadow,
    shadowOffset: {
      width: 0,
      height: 2,
    },
    shadowOpacity: 0.1,
    shadowRadius: 4,
    elevation: 3,
  },
})

export default BackButton

/*
 * End of File: BackButton.tsx
 * Design & Developed by Tech4Biz Solutions
 * Copyright (c) Spurrin Innovations. All rights reserved.
 */
