"use strict";

import { Pressable } from "react-native";
import Animated from "react-native-reanimated";
import { IOListItemStyles, IOListItemVisualParams } from "../../core";
import { useListItemAnimation } from "../../hooks";
import { jsx as _jsx } from "react/jsx-runtime";
export const PressableListItemBase = ({
  onPress,
  testID,
  children,
  accessibilityRole,
  ...props
}) => {
  const {
    onPressIn,
    onPressOut,
    scaleAnimatedStyle,
    backgroundAnimatedStyle
  } = useListItemAnimation();
  return /*#__PURE__*/_jsx(Pressable, {
    onPress: onPress,
    testID: testID,
    accessible: true,
    onPressIn: onPressIn,
    onPressOut: onPressOut,
    onTouchEnd: onPressOut,
    accessibilityRole: accessibilityRole || "button",
    ...props,
    children: /*#__PURE__*/_jsx(Animated.View, {
      style: [IOListItemStyles.listItem, backgroundAnimatedStyle],
      children: /*#__PURE__*/_jsx(Animated.View, {
        style: [IOListItemStyles.listItemInner, {
          columnGap: IOListItemVisualParams.iconMargin
        }, scaleAnimatedStyle],
        children: children
      })
    })
  });
};
//# sourceMappingURL=PressableListItemBase.js.map