"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../../ext-esm/tslib/tslib.es6.js'),t=require("react"),r=require("../types.js"),s=require("../../../constants/completion.js"),n=require("lodash"),a=require("../utils/selectMenuKey.js"),u=require("../../../types/shared/Completions.js"),i=function(t,s){void 0===s&&(s=!1);var i=t.reduce((function(t,r){return e.__spreadArray(e.__spreadArray([],t,!0),[{key:a.getMenuItemKey(u.PadMode.custom,r.id),label:"".concat(r.name),assetId:r.asset_id,wellId:r.id,status:r.status,isSubItem:s}],!1)}),[]);return n.flatten(n.partition(i,{status:r.AssetStatus.active}))};exports.useMenuItems=function(e){var r=e.completionAppType,n=e.assets,o=e.fracFleetLines,c=e.enableSimulFracInPadSelect;return t.useMemo((function(){if(c&&o.length){var e=o.reduce((function(e,t){var r=[{key:a.getMenuItemKey(u.PadMode.padLine,t.id),label:t.name}],s=i(t.frac_fleet_line_wells,!0);return s.length?e.concat(r.concat(s)):e}),[]);return e}var t=i(n);return s.DEFAULT_SUPPORTED_PAD_MODES.concat(t)}),[r,n,o,c])};
