import{d as f,W as u,r as n,E as g,b as j,a as y,X as w,h as S,j as e,B as i,T as p,Y as C,P as d,Z as v}from"./index-d2b25495.js";import{I,R as b}from"./index-19cd9110.js";import{T as R}from"./TextField-e155d2be.js";import{I as z}from"./InputAdornment-d0c3ebef.js";import"./AntdIcon-8449be55.js";import"./objectSpread2-b41ee31b.js";import"./index-709861af.js";import"./FilterFilled-4dfce120.js";import"./FilterOutlined-653b7cb0.js";import"./InfoCircleOutlined-a1ed1ad6.js";import"./SolutionOutlined-bb59aa7b.js";import"./FormControl-73683015.js";import"./OutlinedInput-86f3ec98.js";import"./useFormControl-2b068664.js";import"./InputLabel-bb6ab40e.js";import"./Select-ef36a2b2.js";import"./Menu-337a466b.js";import"./Grow-8719411b.js";import"./List-863f013e.js";import"./useControlled-8d737f13.js";import"./createSvgIcon-e39ae511.js";const A=f(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"})})),Q=()=>{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 h=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:h,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{Q as default};
