"use strict";

import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
import { Ionicons } from '@expo/vector-icons';
import { useThemeStyles } from '../hooks/useThemeStyles';
import { useColorScheme } from '../hooks/use-color-scheme';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
const QuickActions = ({
  actions,
  theme
}) => {
  const colorScheme = useColorScheme();
  const themeStyles = useThemeStyles(theme, colorScheme);
  const textColor = themeStyles.textColor;
  const secondaryBackgroundColor = themeStyles.secondaryBackgroundColor;
  return /*#__PURE__*/_jsx(View, {
    style: [styles.quickActionsContainer, styles.firstGroupedItem, styles.lastGroupedItem, {
      backgroundColor: secondaryBackgroundColor
    }],
    children: /*#__PURE__*/_jsx(View, {
      style: styles.quickActionsRow,
      children: actions.map(action => /*#__PURE__*/_jsxs(View, {
        style: styles.quickActionItem,
        children: [/*#__PURE__*/_jsx(TouchableOpacity, {
          style: [styles.quickActionCircle, {
            backgroundColor: themeStyles.isDarkTheme ? 'rgba(255,255,255,0.08)' : 'rgba(0,0,0,0.03)'
          }],
          onPress: action.onPress,
          children: /*#__PURE__*/_jsx(Ionicons, {
            name: action.icon,
            size: 24,
            color: action.iconColor
          })
        }), /*#__PURE__*/_jsx(Text, {
          style: [styles.quickActionText, {
            color: textColor
          }],
          children: action.title
        })]
      }, action.id))
    })
  });
};
const styles = StyleSheet.create({
  quickActionsContainer: {
    padding: 16,
    marginBottom: 8
  },
  firstGroupedItem: {
    borderTopLeftRadius: 24,
    borderTopRightRadius: 24
  },
  lastGroupedItem: {
    borderBottomLeftRadius: 24,
    borderBottomRightRadius: 24,
    marginBottom: 8
  },
  quickActionsRow: {
    flexDirection: 'row',
    alignItems: 'flex-start',
    justifyContent: 'space-around',
    flexWrap: 'wrap'
  },
  quickActionItem: {
    alignItems: 'center',
    minWidth: 70,
    marginBottom: 8
  },
  quickActionCircle: {
    width: 50,
    height: 50,
    borderRadius: 25,
    alignItems: 'center',
    justifyContent: 'center',
    marginBottom: 8
  },
  quickActionText: {
    fontSize: 12,
    fontWeight: '500',
    textAlign: 'center'
  }
});
export default QuickActions;
//# sourceMappingURL=QuickActions.js.map