import{E as f,r as h,e4 as j,j as e,B as a,_ as y,T as g,e5 as u}from"./index-d2b25495.js";import{D as v}from"./Divider-29971892.js";import{L as C}from"./LoadingButton-c8e88148.js";const E=({title:n,is_goback:i,children:r,showSaveButton:o,onSave:x,loading:l,go_back_url:s,button_name:p="Save",otherButtons:t,extra:c})=>{const d=f(),m=h.useMemo(()=>j(),[]);return e.jsx(a,{sx:{mt:2},children:e.jsxs(y,{sx:{boxShadow:"none"},children:[e.jsxs(a,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",p:2,gap:2,boxShadow:"none"},children:[e.jsxs(g,{variant:"h4",sx:{display:"flex",alignItems:"center",gap:2,cursor:"pointer"},onClick:()=>{typeof s=="function"?s():d(`${s||".."}`,{relative:"path"})},children:[i&&e.jsx(u,{color:m.palette.primary.main}),n,e.jsx(v,{orientation:"horizontal"})]}),e.jsxs(a,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:2,flex:1},children:[t&&t,o&&e.jsx(C,{variant:"contained",size:"large",loading:l,onClick:x,children:p})]}),c]}),r]})})};export{E as G};
