import{l as u,c as f,a as h,h as g,q as j,j as s,B as e,w as d,I as C,a7 as b,E as v}from"./index-5768b108.js";import{a as k}from"./index.esm-14b458d8.js";import{c as y,b as B}from"./index.esm-85e2fec5.js";import{u as R}from"./index.esm-4803c918.js";import{o as S}from"./yup-7ddf262a.js";const N=({pageTitle:T,pageText:w,addModelTile:c,modalVisible:z,setIsModalVisible:r,postfix:A,prefix:E,navigationToAdd:t,otherButtons:n,showFilterButton:x=!1,openFilter:i,filteredData:a,children:p})=>{const l=u();f(),h(o=>g(o)),j();let m=y({search:B()});return R({resolver:S(m),values:{search:a==null?void 0:a.search}}),s.jsx(e,{sx:{flexGrow:1},children:s.jsxs(d,{sx:{padding:2,border:"none",marginTop:"15px"},children:[s.jsx(e,{display:"flex",justifyContent:"flex-end",alignItems:"center",sx:{backgroundColor:"#f1f1f1",borderRadius:"1px 1px 0 0",padding:"1px"},children:s.jsxs(e,{children:[x&&s.jsx(C,{onClick:()=>i&&i(!0),children:s.jsx(b,{size:"15"})}),n&&n,c&&s.jsx(v,{variant:"contained",color:"success",onClick:o=>{r?(r&&r(!0),o.target.blur()):t&&l(t)},endIcon:s.jsx(k,{size:16}),children:c})]})}),s.jsx(e,{mt:2,children:p})]})})};export{N as M};
