import{A as S,d as C,a as F,b as R,H as L,j as s,B as r,a3 as u,T as g,I as z,et as A,U as I}from"./index-c3f592b2.js";import{R as N,a as B}from"./index.esm-1314deac.js";import{c as $,b as k,u as E}from"./index.esm-70dd1c06.js";import{o as G}from"./yup-abb4a026.js";import{D as H}from"./Divider-057a9865.js";import{F as O}from"./FilterFilled-90800ccd.js";const Z=({pageTitle:t,pageText:o,addModelTile:l,goBack:c,modalVisible:P,setIsModalVisible:i,postfix:U,prefix:q,navigationToAdd:x,gobackurl:m,otherButtons:p,showFilterButton:y=!1,openFilter:d,filteredData:a,searchComponent:h,children:b})=>{var j,f;const n=S();C(),F(e=>R(e));const v=L();let w=$({search:k()});return E({resolver:G(w),values:{search:a==null?void 0:a.search}}),s.jsxs(r,{sx:{flexGrow:1,margin:0,padding:0},children:[s.jsx(u,{sx:{padding:0,border:"none",margin:0,width:"100%",borderRadius:0,boxShadow:"none"},children:s.jsxs(r,{display:"flex",justifyContent:"space-between",alignItems:"center",sx:{padding:2,mt:1},children:[s.jsxs(r,{display:"flex",alignItems:"center",children:[c&&s.jsx("span",{onClick:()=>{n(m||-1)},style:{cursor:"pointer",color:(f=(j=v.palette)==null?void 0:j.primary)==null?void 0:f.main},children:s.jsx(N,{size:20})}),t&&s.jsx(g,{variant:"h5",sx:{marginLeft:c?"12px":"0",mt:-1},children:t}),o&&s.jsx(g,{variant:"body2",style:{marginLeft:"8px"},children:o})]}),s.jsxs(r,{display:"flex",gap:1,alignItems:"center",children:[h&&h,y&&s.jsx(z,{onClick:()=>d&&d(!0),children:Object.values(a).every(e=>e==null||e==""||e==null)?s.jsx(A,{className:"hp-mr-10",style:{fontSize:"16px"}}):s.jsx(O,{className:"hp-mr-10",style:{fontSize:"16px"}})}),p&&p,l&&s.jsx(I,{variant:"contained",color:"primary",onClick:e=>{i?(i&&i(!0),e.target.blur()):x&&n(x)},startIcon:s.jsx(B,{size:16}),children:l})]})]})}),s.jsx(H,{sx:{width:"calc(100% + 40px)",marginLeft:"-20px",mb:2}}),s.jsx(u,{sx:{padding:0,border:"none",margin:0,width:"100%",borderRadius:0,boxShadow:"none"},children:s.jsx(r,{sx:{padding:2},children:b})})]})};export{Z as M};
