"use strict";
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.useRiskById = exports.useRisk = void 0;
var utils_1 = require("../utils");
var async_1 = require("./async");
function useRisk() {
    return (0, async_1.useAsync)(utils_1.getAllRisk, []);
}
exports.useRisk = useRisk;
function useRiskById(id) {
    var _a = (0, async_1.useAsync)(utils_1.getRiskById, [id]), _b = _a.res, res = _b === void 0 ? {} : _b, error = _a.error, loading = _a.loading;
    return __assign(__assign({}, res), { error: error, loading: loading });
}
exports.useRiskById = useRiskById;
//# sourceMappingURL=useRisk.js.map