import { View, Text, Platform } from "react-native";
import React from "react";
import ActionSheet from "react-native-actions-sheet";
import { gutters, Palette } from "../styles";
import { BlurView } from "expo-blur";

const AppActionSheet = ({ children, props }) => {
  return (
    <ActionSheet
      containerStyle={{ backgroundColor: Palette.tran }}
      gestureEnabled
      indicatorStyle={{
        top: 20,
        width: 50,
        zIndex: 2,
      }}
      {...props}
    >
      <BlurView
        intensity={20}
        style={{
          paddingTop: 36,
          paddingHorizontal: 14,
          paddingBottom: gutters,
          backgroundColor: Palette.glass,
          borderTopLeftRadius: 20,
          borderTopRightRadius: 20,
          overflow: "hidden",
        }}
        experimentalBlurMethod={
          Platform.OS !== "ios" ? "dimezisBlurView" : "none"
        }
      >
        {children}
      </BlurView>
    </ActionSheet>
  );
};

export default AppActionSheet;
