import{F as v,b as F,a as C,h as b,E as L,j as s,B as a,_ as S,c as z,T as f,I as R,rl as k,K as w}from"./index-60a3c753.js";import{R as A,a as I}from"./index.esm-8ea8e217.js";import{c as N,b as B}from"./index.esm-62d6b2f7.js";import{u as E}from"./index.esm-c494934a.js";import{o as $}from"./yup-92678dde.js";import{F as G}from"./FilterFilled-cdde02db.js";const W=({pageTitle:i,pageText:n,addModelTile:l,goBack:o,modalVisible:K,setIsModalVisible:t,postfix:O,prefix:P,navigationToAdd:c,otherButtons:m,showFilterButton:u=!1,openFilter:x,filteredData:r,children:y})=>{var h,j;const p=v();F(),C(e=>b(e));const d=L();let g=N({search:B()});return E({resolver:$(g),values:{search:r==null?void 0:r.search}}),s.jsx(a,{sx:{flexGrow:1},children:s.jsxs(S,{sx:{padding:2,border:"none",marginTop:"15px"},children:[s.jsxs(a,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[s.jsxs(a,{display:"flex",alignItems:"center",children:[o&&s.jsx(s.Fragment,{children:s.jsx(z,{to:"#",onClick:()=>p(-1),style:{textDecoration:"none",color:(j=(h=d.palette)==null?void 0:h.primary)==null?void 0:j.main},children:s.jsx(A,{size:20})})}),i&&s.jsx(f,{variant:"h5",sx:{marginLeft:o?"12px":"0",mt:-1},children:i}),n&&s.jsx(f,{variant:"body2",style:{marginLeft:"8px"},children:n})]}),s.jsxs(a,{display:"flex",gap:1,children:[u&&s.jsx(R,{onClick:()=>x&&x(!0),children:Object.values(r).every(e=>e==null||e==""||e==null)?s.jsx(k,{className:"hp-mr-10",style:{fontSize:"16px"}}):s.jsx(G,{className:"hp-mr-10",style:{fontSize:"16px"}})}),m&&m,l&&s.jsx(w,{variant:"contained",color:"primary",onClick:e=>{t?(t&&t(!0),e.target.blur()):c&&p(c)},startIcon:s.jsx(I,{size:16}),children:l})]})]}),y]})})};export{W as M};
