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