import{F as v,b as F,a as b,h as C,E as L,j as s,B as a,_ as S,c as z,T as f,I as R,rb as k,K as w}from"./index-76d4793e.js";import{R as A,a as I}from"./index.esm-d9f89842.js";import{c as N,b as B}from"./index.esm-ad8a7c9f.js";import{u as E}from"./index.esm-3adfd9f7.js";import{o as $}from"./yup-688ec4f6.js";import{F as G}from"./FilterFilled-aa7d40e4.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(),b(e=>C(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};
