import{f as h,P as u,r as n,k as g,d as j,a as y,O as w,i as S,j as e,B as o,T as p,M as C,Q as b}from"./index-c5c88b67.js";import{I as v,R as I}from"./index-b2a5dc24.js";import{T as R}from"./TextField-78388962.js";import{I as k}from"./InputAdornment-d66117f3.js";import{G as d}from"./Grid2-0ff60c92.js";import"./AntdIcon-1a0d7a6b.js";import"./objectSpread2-65a0d991.js";import"./index-c98d1d89.js";import"./index-e5978b8b.js";import"./FilterFilled-9066fadd.js";import"./FilterOutlined-67649527.js";import"./InfoCircleOutlined-5e2e2c5e.js";import"./SolutionOutlined-6666f022.js";import"./Menu-e7d2b2ee.js";import"./Grow-7345f8ea.js";import"./isMuiElement-b3c21f38.js";import"./Select-4ed8db5d.js";const z=h(u)(({theme:s})=>({backgroundColor:"#fff",...s.typography.body2,padding:s.spacing(4),textAlign:"left",borderRadius:"10px",cursor:"pointer",color:s.palette.text.secondary,...s.applyStyles("dark",{backgroundColor:"#1A2027"})})),H=()=>{const[s,i]=n.useState([]),x=g(),m=j(),{system:{reportsMenuItemsList:r}}=y(t=>w(t));n.useEffect(()=>{m(S({code:"MENU0005",from:"reportsmenu"}))},[]),n.useEffect(()=>{i(r)},[r]);const f=t=>{const c=r==null?void 0:r.filter(a=>a.label.toLowerCase().includes(t.target.value.toLowerCase()));t.target.value===""?i(r):i(c)},l=t=>{x(t)};return e.jsxs(o,{sx:{width:"100%"},children:[e.jsxs(o,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",my:"24px"},children:[e.jsx(p,{variant:"h5",color:"text.primary",children:"Reports"}),e.jsx(o,{sx:{display:{xs:"hidden",md:"flex"},alignItems:"center",gap:"10px",fontWeight:600},children:e.jsx(o,{sx:{position:"static",overflowY:"hidden"},children:e.jsx(R,{id:"input-with-icon-textfield",size:"small",InputProps:{startAdornment:e.jsx(k,{position:"start",children:e.jsx(C,{size:20})})},sx:{width:300},onChange:f,variant:"outlined",placeholder:"Search Report..."})})})]}),(s==null?void 0:s.length)!=0?e.jsx(d,{container:!0,rowSpacing:2,columnSpacing:{xs:1,sm:2,md:3},style:{marginLeft:"0px"},children:s==null?void 0:s.map((t,c)=>{const a=v[t.icon];return e.jsx(e.Fragment,{children:e.jsx(d,{size:{xs:12,md:6,lg:6,xl:3},children:e.jsx(z,{sx:{border:"1px solid #dee2e6",boxShadow:"none"},onClick:()=>l(t.url),children:e.jsxs(o,{display:"flex",alignItems:"center",children:[a?e.jsx(a,{style:{fontSize:16}}):e.jsx(I,{style:{fontSize:16}}),e.jsx(p,{sx:{color:"text.secondary",fontSize:"16px",paddingX:2,flexGrow:1},onClick:()=>{},variant:"h6",children:t==null?void 0:t.label}),e.jsx(b,{size:"20",onClick:()=>{l(t.url)}})]})})})})})}):""]})};export{H as default};
