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