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-e0c07a84.js";import{I as v,R as I}from"./index-89215fac.js";import{T as z}from"./TextField-23174150.js";import{I as R}from"./InputAdornment-bf957c61.js";import{G as p}from"./Grid2-05f25635.js";import"./AntdIcon-bc64d1d9.js";import"./objectSpread2-f946b5f0.js";import"./index-c7a54fed.js";import"./index-e5978b8b.js";import"./FilterFilled-80640201.js";import"./FilterOutlined-6138f61b.js";import"./InfoCircleOutlined-7db61317.js";import"./SolutionOutlined-d47f9a2d.js";import"./Select-a8f8fd6a.js";import"./Grow-5c4c469c.js";import"./isMuiElement-953ce284.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};
