import{k as R,d as S,a as C,b as F,o as z,j as s,B as r,R as u,T as g,I as L,dV as I,z as A}from"./index-4dfc510b.js";import{R as N,a as k}from"./index.esm-337179d9.js";import{c as B,b as $,u as E}from"./index.esm-0a454763.js";import{o as G}from"./yup-80def618.js";import{D as O}from"./Divider-1794f57d.js";import{F as P}from"./FilterFilled-dc66781c.js";const Y=({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=R();S(),C(e=>F(e));const v=z();let w=B({search:$()});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(k,{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{Y as M};
