import{f as h,P as u,r as n,z as g,d as j,a as y,a0 as w,i as S,j as e,B as a,T as d,_ as C,a1 as b}from"./index-e6164346.js";import{I as v,R as I}from"./index-f43cdd1d.js";import{T as z}from"./TextField-db9cff08.js";import{I as R}from"./InputAdornment-59975edf.js";import{G as p}from"./Grid2-c9c87842.js";import"./AntdIcon-4f5aa87b.js";import"./objectSpread2-7d7378cc.js";import"./index-ce90e1a7.js";import"./index-e5978b8b.js";import"./FilterFilled-c0851aaa.js";import"./FilterOutlined-3561fb77.js";import"./InfoCircleOutlined-b5c3e5b6.js";import"./SolutionOutlined-90323040.js";import"./Select-9c2d8cd2.js";import"./Grow-306e2fd0.js";import"./isMuiElement-5779af4f.js";const A=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(o=>o.label.toLowerCase().includes(t.target.value.toLowerCase()));t.target.value===""?i(r):i(c)},l=t=>{x(t)};return e.jsxs(a,{sx:{width:"100%"},children:[e.jsxs(a,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",my:"24px"},children:[e.jsx(d,{variant:"h5",color:"text.primary",children:"Reports"}),e.jsx(a,{sx:{display:{xs:"hidden",md:"flex"},alignItems:"center",gap:"10px",fontWeight:600},children:e.jsx(a,{sx:{position:"static",overflowY:"hidden"},children:e.jsx(z,{id:"input-with-icon-textfield",size:"small",InputProps:{startAdornment:e.jsx(R,{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(p,{container:!0,rowSpacing:2,columnSpacing:{xs:1,sm:2,md:3},style:{marginLeft:"0px"},children:s==null?void 0:s.map((t,c)=>{const o=v[t.icon];return e.jsx(e.Fragment,{children:e.jsx(p,{size:{xs:12,md:6,lg:6,xl:3},children:e.jsx(A,{sx:{border:"1px solid #dee2e6",boxShadow:"none"},onClick:()=>l(t.url),children:e.jsxs(a,{display:"flex",alignItems:"center",children:[o?e.jsx(o,{style:{fontSize:16}}):e.jsx(I,{style:{fontSize:16}}),e.jsx(d,{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};
