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-43bf7a1c.js";import{I,R as b}from"./index-4d9acd7a.js";import{T as R}from"./TextField-4da97115.js";import{I as z}from"./InputAdornment-b1a1aa58.js";import"./AntdIcon-634507e8.js";import"./objectSpread2-c31b885b.js";import"./presets-bb9bdfd8.js";import"./FilterFilled-ccc86e02.js";import"./FilterOutlined-908c8e25.js";import"./InfoCircleOutlined-93449dd4.js";import"./SolutionOutlined-2be2f413.js";import"./FormControl-8d011aab.js";import"./OutlinedInput-6bcf3cf8.js";import"./useFormControl-2c5d60c2.js";import"./List-6fcc4821.js";import"./InputLabel-6c7474f0.js";import"./Select-44fd3147.js";import"./Menu-362130d3.js";import"./Grow-ca573f65.js";import"./useControlled-ab567149.js";import"./createSvgIcon-f118be02.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};
