"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../../ext-esm/tslib/tslib.es6.js'),s=require("react/jsx-runtime"),i=require("classnames"),o=require("@material-ui/core"),n=require("../../../icons/iconParkIcons.js");require("../../../icons/customIcons/icons/AddMessage.js"),require("../../../icons/customIcons/icons/Attention.js"),require("../../../icons/customIcons/icons/Collapse.js"),require("../../../icons/customIcons/icons/Dashboard.js"),require("../../../icons/customIcons/icons/Expand.js"),require("../../../icons/customIcons/icons/FolderClosed.js"),require("../../../icons/customIcons/icons/FolderClosedFilled.js"),require("../../../icons/customIcons/icons/FolderOpened.js"),require("../../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../../icons/customIcons/icons/LessOrEqual.js"),require("../../../icons/customIcons/icons/Search.js"),require("../../../icons/customIcons/icons/Wellhub.js"),require("../../../icons/customIcons/icons/MultiRuler.js"),require("../../../icons/customIcons/icons/Checkbox.js"),require("../../../icons/customIcons/icons/CheckboxChecked.js"),require("../../../icons/customIcons/icons/CheckboxIndeterminate.js"),require("../../../icons/customIcons/icons/Radio.js"),require("../../../icons/customIcons/icons/RadioChecked.js"),require("../../../icons/customIcons/icons/SimulFrac.js"),require("../../../icons/customIcons/icons/ZipperFrac.js"),require("../../../icons/customIcons/icons/CautionFilled.js"),require("../../../icons/customIcons/icons/MoreApp.js");var t=require("../AppSideBar/AppSideBar.js"),r=require("../../IconButton/index.js"),c=require("../AppSettingsPopover/AppSettingsPopover.js"),a=require("../../Button/components/Button/index.js");require("moment-timezone"),require("../../Button/components/LiveButton/components/LiveButtonStateIndicator/index.js"),require("../../Button/components/LiveButton/styles.js");var u=require("../../../effects/useMatchAppContainerSize.js"),l=require("../../../utils/mobileDetect.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=d(i),m=o.makeStyles({appLayout:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},header:{paddingLeft:12,paddingRight:12,display:"flex",height:36},contentWrapper:{display:"flex",position:"relative",flexGrow:1,height:"calc(100% - 36px)","@media (max-width: 960px)":{height:"100%"}},content:{display:"flex",flexDirection:"column",textAlign:"center",alignItems:"center",justifyContent:"center",height:"100%",width:"100%"},popoverContent:{padding:"0 16px"},filtersTrigger:{width:30,height:30}}),h=function(i){var t=o.useTheme(),c=u.useMatchAppContainerSize({width:{max:t.breakpoints.width("md")}}),l=m();return c?s.jsx(r,e.__assign({className:l.filtersTrigger,size:"small",tooltipProps:{title:"Filters"},variant:"contained"},i,{children:s.jsx(n.CenterAlignmentIcon,{size:16})})):s.jsx(a,e.__assign({startIcon:s.jsx(n.CenterAlignmentIcon,{size:16})},i,{children:"Filters"}))};exports.AppFilterPanelLayout=function(i){var n=i.appSettingsPopoverProps,r=i.children,a=i.classes,d=void 0===a?{}:a,j=i.header,q=i.sideBarContent,g=i.sideBarProps,x=m(),I=o.useTheme(),f=u.useMatchAppContainerSize({width:{max:I.breakpoints.width("md")}}),v=l.isNativeDetected||l.isMobileDetected||f;return s.jsxs("div",e.__assign({className:p.default(x.appLayout,d.appLayout)},{children:[v&&s.jsxs("div",e.__assign({className:p.default(x.header,d.header)},{children:[s.jsx(c.AppSettingsPopover,e.__assign({Trigger:h,classes:{popoverContent:x.popoverContent},header:"Filters",anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},n,{children:q})),j]})),s.jsxs("div",e.__assign({className:p.default(x.contentWrapper,d.contentWrapper)},{children:[!v&&s.jsx(t,e.__assign({},g,{anchor:"left"},{children:q})),r&&s.jsx("div",e.__assign({className:p.default(x.content,d.content)},{children:r}))]}))]}))};
