"use strict";var e=require("react"),s=require("prop-types"),i=require("react-sizeme"),r=require("@material-ui/core"),t=require("./effects/index.js"),l=require("./utils.js"),a=require("./constants.js"),n=require("./HeaderLayout.css.js"),d=require("react/jsx-runtime");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=c(s);function o(s,i){var r,t,l,n;return s===a.SMALL_SIZE_LAYOUT&&i?e.cloneElement(i,i.props,(r=i.props.children,t=r.split(" "),l=r[0],n=t[t.length-1],"".concat(l," ").concat(n))):i}function h(s){var i=s.children,c=s.appWidth,u=t.useComonentsWidth(i),h=u.componentsWidth,p=u.hiddenElements,f=t.useFilterLayout(i,h,c),m=l.getAppTitle(i),j=l.getAppSubTitle(i),x=l.getExpander(i),v=l.getOffsetPicker(i),y=l.getSecondaryAsset(i),L=l.getModeSelect(i),S=l.getPadChip(i),A=l.getPrimaryAsset(i),g=l.getOffsetWellsChip(i),O=e.useMemo((function(){return o(f,A)}),[f,A]),T=e.useMemo((function(){return o(f,S)}),[f,S]);return d.jsxs("div",{style:{width:"100%"},children:[d.jsx(r.Collapse,{timeout:10,in:f===a.LARGE_SIZE_LAYOUT,children:d.jsxs("div",{className:n.layoutContainer,children:[d.jsxs("div",{className:n.layoutTopLarge,children:[d.jsx("div",{children:m}),d.jsxs("div",{className:n.layoutTopRightLarge,children:[y,L,d.jsxs("div",{className:n.layoutOffsetpicker,children:[x,v]}),S,A]})]}),d.jsx("div",{children:j}),d.jsx("div",{className:n.layoutOffsetwellChipsLarge,children:g})]})}),d.jsx(r.Collapse,{timeout:10,in:[a.MEDIUM_SIZE_LAYOUT,a.SMALL_SIZE_LAYOUT].includes(f),children:d.jsxs("div",{className:n.layoutContainer,children:[d.jsxs("div",{className:n.layoutTopSmall,children:[d.jsx("div",{children:m}),d.jsxs("div",{className:n.assetChips,children:[f===a.MEDIUM_SIZE_LAYOUT&&d.jsxs(d.Fragment,{children:[S,A]}),f===a.SMALL_SIZE_LAYOUT&&O]})]}),d.jsx("div",{children:j}),d.jsxs("div",{className:n.layoutBottomSmall,children:[y,L,f===a.SMALL_SIZE_LAYOUT&&T,d.jsxs("div",{className:n.layoutOffsetpicker,children:[x,v]})]}),d.jsx("div",{className:n.layoutOffsetwellChipsSmall,children:g})]})}),p]})}function p(e){return d.jsx(i.SizeMe,{monitorWidth:!0,children:function(s){var i=s.size;return d.jsx(h,{appWidth:i.width-21,children:e.children})}})}h.propTypes={appWidth:u.default.func.isRequired,children:u.default.arrayOf(u.default.node).isRequired},p.propTypes={children:u.default.arrayOf(u.default.node).isRequired},module.exports=p;
//# sourceMappingURL=HeaderLayout.js.map
