"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useAutoCollapseOnSuccess = useAutoCollapseOnSuccess;
const react_1 = require("react");
function useAutoCollapseOnSuccess(options) {
    const { enabled, status, setIsExpanded } = options;
    const isSuccess = status === 'success';
    (0, react_1.useEffect)(() => {
        if (enabled && isSuccess) {
            setIsExpanded(false);
        }
    }, [enabled, isSuccess, setIsExpanded]);
}
//# sourceMappingURL=useAutoCollapseOnSuccess.js.map
