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-0698dbe6.js";import{I as v,R as I}from"./index-57919a24.js";import{T as z}from"./TextField-4222c766.js";import{I as R}from"./InputAdornment-0c2174b6.js";import{G as p}from"./Grid2-a3850bef.js";import"./AntdIcon-ef833303.js";import"./objectSpread2-86ebda25.js";import"./index-c9a9ee7a.js";import"./index-e5978b8b.js";import"./FilterFilled-b68f936d.js";import"./FilterOutlined-0ae4b12f.js";import"./InfoCircleOutlined-1b464163.js";import"./SolutionOutlined-86bf5087.js";import"./Select-371fc2c6.js";import"./Grow-ea87e600.js";import"./isMuiElement-d179539f.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};
