import r from"@babel/runtime/helpers/toConsumableArray";import e from"@babel/runtime/helpers/slicedToArray";import{useState as o,useEffect as t}from"react";import{FilterOptions as n}from"../constants.js";function a(a){var l=o([]),u=e(l,2),i=u[0],c=u[1];return t((function(){if(a){var e=n.map((function(e){var o=e.value,t=e.label,n=a.reduce((function(e,t){return"Null"===t[o]||e.includes(t[o])?e:[].concat(r(e),[t[o]])}),[]);return{value:o,label:t,options:[].concat(r(n.sort()),["Null"])}}));c(e)}}),[a]),i}export{a as useFilterOptions};
