import{E as v,b as C,a as F,g as b,C as L,j as s,B as a,_ as S,c as z,T as f,I as R,rl as k,J as w}from"./index-d2b25495.js";import{R as A,a as I}from"./index.esm-0ec21729.js";import{c as N,b as B}from"./index.esm-3043d6d4.js";import{u as E}from"./index.esm-ce3c2c20.js";import{o as $}from"./yup-267e586f.js";import{F as G}from"./FilterFilled-4dfce120.js";const W=({pageTitle:i,pageText:n,addModelTile:l,goBack:o,modalVisible:J,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();C(),F(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};
