import{z as F,d as R,a as S,b as C,F as z,j as s,B as r,a2 as u,T as g,I as L,ec as I,R as A}from"./index-458d5762.js";import{R as N,a as B}from"./index.esm-5ead9a4b.js";import{c as $,b as k,u as E}from"./index.esm-b1b14098.js";import{o as G}from"./yup-536c503d.js";import{D as O}from"./Divider-41f4fe7b.js";import{F as P}from"./FilterFilled-c223055e.js";const Z=({pageTitle:t,pageText:o,addModelTile:l,goBack:c,modalVisible:q,setIsModalVisible:i,postfix:H,prefix:J,navigationToAdd:x,gobackurl:m,otherButtons:p,showFilterButton:y=!1,openFilter:d,filteredData:a,searchComponent:h,children:b})=>{var j,f;const n=F();R(),S(e=>C(e));const v=z();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(L,{onClick:()=>d&&d(!0),children:Object.values(a).every(e=>e==null||e==""||e==null)?s.jsx(I,{className:"hp-mr-10",style:{fontSize:"16px"}}):s.jsx(P,{className:"hp-mr-10",style:{fontSize:"16px"}})}),p&&p,l&&s.jsx(A,{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(O,{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};
