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-d9e0bbb9.js";import{a as k}from"./index.esm-7c8d9040.js";import{c as y,b as B}from"./index.esm-65c50bc3.js";import{u as R}from"./index.esm-97139da9.js";import{o as S}from"./yup-267c2267.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};
