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-d895656a.js";import{I as v,R as I}from"./index-a92d565e.js";import{T as R}from"./TextField-6f73e19a.js";import{I as k}from"./InputAdornment-36977269.js";import{G as d}from"./Grid2-5bd460ea.js";import"./AntdIcon-19e16777.js";import"./objectSpread2-c21546fe.js";import"./index-45bf15b6.js";import"./index-e5978b8b.js";import"./FilterFilled-9d5acdc3.js";import"./FilterOutlined-b6007bf1.js";import"./InfoCircleOutlined-e4f82e2a.js";import"./SolutionOutlined-af91082b.js";import"./Menu-1728e1dd.js";import"./Grow-d4be81a5.js";import"./isMuiElement-424c145f.js";import"./Select-6d425a72.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};
