import{useMemo as e}from"react";import{shape as r}from"prop-types";import{isEmpty as o}from"lodash";import{makeStyles as t}from"@material-ui/core";import a from"../NoData.js";import{getSummaries as i}from"./utils.js";import s from"../../../../../StageDesignVActual/ComparisonHeader.js";import m from"../../../../../StageDesignVActual/ComparisonRow.js";import n from"../../../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import{jsx as l,jsxs as p}from"react/jsx-runtime";var u=t({wrapper:{flex:"1",overflowY:"auto",padding:"0 5px"}}),f=function(r){var t,f=r.feedItem,d=r.stages,c=r.predictionsData,g=u(),y=(null===(t=f.context)||void 0===t?void 0:t.completion_actual_stage)||{},h=e((function(){return i(y,d,c)}),[y,d,c]);return o(d)&&o(y)?l(a,{subject:"stages"}):p("div",{className:g.wrapper,children:[l(s,{renderStages:function(){var e;return o(y)?"":"Stage Number: ".concat(null===(e=y.data)||void 0===e?void 0:e.stage_number)}}),l(m,{rowKey:"top_perforation",label:"Top Perforation",unitType:"length",summaries:h}),l(m,{rowKey:"bottom_perforation",label:"Bottom Perforation",unitType:"length",summaries:h}),l(m,{rowKey:"perforated_length",label:"Perforation Length",unitType:"length",summaries:h}),l(m,{rowKey:"total_shots",label:"Total Shots",summaries:h}),l(m,{rowKey:"flush_volume",label:"Flush Volume",unitType:"oil",summaries:h}),l(n,{rowKey:"chemicals",summaries:h}),l(n,{rowKey:"proppants",summaries:h}),l(n,{rowKey:"fluids",summaries:h})]})};f.propTypes={feedItem:r().isRequired,stages:r().isRequired,predictionsData:r().isRequired};export{f as default};
