import{d as h,W as u,r as n,F as g,b as j,a as y,X as w,i as S,j as e,B as i,T as p,Y as C,Q as d,Z as v}from"./index-60a3c753.js";import{I,R as b}from"./index-3ddab5e6.js";import{T as R}from"./TextField-32b29087.js";import{I as z}from"./InputAdornment-96c40dce.js";import"./AntdIcon-bed41c21.js";import"./objectSpread2-85813881.js";import"./presets-06d13753.js";import"./FilterFilled-cdde02db.js";import"./FilterOutlined-c131dc67.js";import"./InfoCircleOutlined-351fb70a.js";import"./SolutionOutlined-614dece1.js";import"./FormControl-d13d2693.js";import"./OutlinedInput-3a884178.js";import"./useFormControl-e13b5747.js";import"./List-f567f8e4.js";import"./InputLabel-71dfc9d4.js";import"./Select-99fc0d84.js";import"./Menu-d1b7e1c3.js";import"./Grow-68442588.js";import"./useControlled-194ef007.js";import"./createSvgIcon-de433e5f.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"})})),O=()=>{const[s,a]=n.useState([]),x=g(),m=j(),{system:{reportsMenuItemsList:r}}=y(t=>w(t));n.useEffect(()=>{m(S({code:"MENU0005",from:"reportsmenu"}))},[]),n.useEffect(()=>{a(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===""?a(r):a(c)},l=t=>{x(t)};return e.jsxs(i,{sx:{width:"100%"},children:[e.jsxs(i,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",my:"24px"},children:[e.jsx(p,{variant:"h5",color:"text.primary",children:"Reports"}),e.jsx(i,{sx:{display:{xs:"hidden",md:"flex"},alignItems:"center",gap:"10px",fontWeight:600},children:e.jsx(i,{sx:{position:"static",overflowY:"hidden"},children:e.jsx(R,{id:"input-with-icon-textfield",size:"small",InputProps:{startAdornment:e.jsx(z,{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 o=I[t.icon];return e.jsx(e.Fragment,{children:e.jsx(d,{size:{xs:12,md:6,lg:6,xl:3},children:e.jsx(A,{onClick:()=>l(t.url),children:e.jsxs(i,{display:"flex",alignItems:"center",children:[o?e.jsx(o,{style:{fontSize:16}}):e.jsx(b,{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(v,{size:"20",onClick:()=>{l(t.url)}})]})})})})})}):""]})};export{O as default};
