import { jsx as _jsx } from "react/jsx-runtime";
import { create } from "../../modal/modalHelper";
import { useModal } from "../../modal";
import { modalActions } from "../../modal/modalContext";
import { ActionSheet } from "../../sheet/actionSheet/actionSheet";
import { useEffect } from "react";
export const InnerActionSheet = create((props)=>{
    const { visible, hide, remove } = useModal();
    useEffect(()=>{
        return ()=>{
            remove();
        };
    }, []);
    return /*#__PURE__*/ _jsx(ActionSheet, {
        open: visible,
        onClose: hide,
        actionSheets: props.items
    });
});
/**
 * show action sheet
 * @param items
 */ export const actionSheet = (items)=>{
    return modalActions.show(InnerActionSheet, {
        items
    });
};

//# sourceMappingURL=actionSheet.js.map