"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _reactNative = require("react-native");
var _vectorIcons = require("@expo/vector-icons");
var _useThemeStyles = require("../hooks/useThemeStyles");
var _useColorScheme = require("../hooks/use-color-scheme");
var _jsxRuntime = require("react/jsx-runtime");
const QuickActions = ({
  actions,
  theme
}) => {
  const colorScheme = (0, _useColorScheme.useColorScheme)();
  const themeStyles = (0, _useThemeStyles.useThemeStyles)(theme, colorScheme);
  const textColor = themeStyles.textColor;
  const secondaryBackgroundColor = themeStyles.secondaryBackgroundColor;
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
    style: [styles.quickActionsContainer, styles.firstGroupedItem, styles.lastGroupedItem, {
      backgroundColor: secondaryBackgroundColor
    }],
    children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
      style: styles.quickActionsRow,
      children: actions.map(action => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
        style: styles.quickActionItem,
        children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
          style: [styles.quickActionCircle, {
            backgroundColor: themeStyles.isDarkTheme ? 'rgba(255,255,255,0.08)' : 'rgba(0,0,0,0.03)'
          }],
          onPress: action.onPress,
          children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
            name: action.icon,
            size: 24,
            color: action.iconColor
          })
        }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
          style: [styles.quickActionText, {
            color: textColor
          }],
          children: action.title
        })]
      }, action.id))
    })
  });
};
const styles = _reactNative.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'
  }
});
var _default = exports.default = QuickActions;
//# sourceMappingURL=QuickActions.js.map