"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/toConsumableArray"),r=require("@babel/runtime/helpers/slicedToArray"),t=require("react"),u=require("../constants.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=n(e),l=n(r);exports.useFilterOptions=function(e){var r=t.useState([]),n=l.default(r,2),i=n[0],o=n[1];return t.useEffect((function(){if(e){var r=u.FilterOptions.map((function(r){var t=r.value,u=r.label,n=e.reduce((function(e,r){return"Null"===r[t]||e.includes(r[t])?e:[].concat(a.default(e),[r[t]])}),[]);return{value:t,label:u,options:[].concat(a.default(n.sort()),["Null"])}}));o(r)}}),[e]),i};
