import r from"@babel/runtime/helpers/defineProperty";import{get as e,sortBy as t}from"lodash";import{FORMATION_COLORS as n}from"../../constants.js";function o(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function i(o){var i=[],u=!1;o.forEach((function(r){"Null"===r.formation?u=!0:i.includes(e(r,"formation"))||i.push(e(r,"formation"))}));var f=t(i);u&&!f.includes("Null")&&f.push("Null");var p=f.reduce((function(e,t,o){return c(c({},e),{},r({},t,n[o%n.length]))}),{});return[f,p]}export{i as getAllFormations};
