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-4dfc510b.js";import{I as v,R as I}from"./index-ab5f5c27.js";import{T as R}from"./TextField-c0d4022e.js";import{I as k}from"./InputAdornment-ccd6e8ff.js";import{G as d}from"./Grid2-713975b3.js";import"./AntdIcon-90a37458.js";import"./objectSpread2-66550f90.js";import"./index-9a385720.js";import"./index-e5978b8b.js";import"./FilterFilled-dc66781c.js";import"./FilterOutlined-6c52d192.js";import"./InfoCircleOutlined-7cf818df.js";import"./SolutionOutlined-20d5a854.js";import"./Menu-0f556e12.js";import"./Grow-a7315f12.js";import"./isMuiElement-7be61a21.js";import"./Select-c8503f85.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};
