import{X as p,j as e,S as s,o as j,aO as u}from"./vendor-mui-CBBEb17G.js";import{a as f}from"./vendor-react-BBazpZul.js";import{dR as b,ax as y,ao as a,I as c,c as g,dr as I}from"./index-IP_FWtso.js";import{j as i}from"./selectSupplementInsuranceList-ChcGDXE8.js";const N=({children:n,loading:r,className:l,onSearch:t,onPrint:d})=>{const[x,o]=f.useState(!1),m=b(),h=p(m.breakpoints.up("md"));return y("Enter",()=>t()),e.jsx(e.Fragment,{children:h?e.jsxs(s,{spacing:1,className:g("relative h-full px-3 py-0 !overflow-y-auto scrollbar-thin border-l bg-slate-50",l),children:[n,e.jsx(i,{}),e.jsxs(s,{className:"sticky bottom-1 py-2 z-50 flex !flex-row items-center justify-center gap-1 !w-full !bg-slate-50",children:[e.jsx(a,{onClick:t,color:r?"inherit":"primary",loading:r,disabled:r,startIcon:e.jsx(c.SearchIcon,{}),children:"جستجو"}),e.jsx(a,{onClick:d,color:"success",disabled:r,startIcon:e.jsx(c.PrintIcon,{}),children:"چاپ"})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(s,{width:"100%",alignItems:"center",justifyContent:"center",paddingLeft:1.5,children:e.jsx(j,{onClick:()=>o(!0),sx:{zIndex:999,borderRight:"2px solid blue",background:"#4ebcf5",borderRadius:"0 50% 50% 0","&:hover":{background:"#4ebcf5"}},children:e.jsx(I,{fontSize:"large",color:"primary"})})}),e.jsx(u,{anchor:"right",open:x,onClose:()=>o(!1),children:e.jsx(s,{width:"270px",direction:"row",alignItems:"center",children:e.jsxs(s,{padding:1.5,className:"!space-y-3",children:[n,e.jsx(i,{}),e.jsx(s,{alignItems:"center",children:e.jsx(a,{style:{width:"50%"},onClick:t,loading:r,children:"جستجو"})})]})})})]})})};export{N as S};
