"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: all[name]
    });
}
_export(exports, {
    InnerActionSheet: function() {
        return InnerActionSheet;
    },
    actionSheet: function() {
        return actionSheet;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _modalHelper = require("../../modal/modalHelper");
const _modal = require("../../modal");
const _modalContext = require("../../modal/modalContext");
const _actionSheet = require("../../sheet/actionSheet/actionSheet");
const _react = require("react");
const InnerActionSheet = (0, _modalHelper.create)((props)=>{
    const { visible, hide, remove } = (0, _modal.useModal)();
    (0, _react.useEffect)(()=>{
        return ()=>{
            remove();
        };
    }, []);
    return /*#__PURE__*/ (0, _jsxruntime.jsx)(_actionSheet.ActionSheet, {
        open: visible,
        onClose: hide,
        actionSheets: props.items
    });
});
const actionSheet = (items)=>{
    return _modalContext.modalActions.show(InnerActionSheet, {
        items
    });
};

//# sourceMappingURL=actionSheet.js.map