import{l as h,r as j,bx as y,j as e,B as t,w as C,by as u,T as v}from"./index-5768b108.js";import{C as L}from"./CardContent-4b37116a.js";import{L as k}from"./LoadingButton-b684247e.js";const I=({title:n,is_goback:l,children:o,showSaveButton:c,onSave:a,loading:x,go_back_url:r,rightActions:p,button_name:s="Save",otherButtons:i,extra:d})=>{const m=h(),f=j.useMemo(()=>y(),[]),g=async w=>{a?a():s.toLowerCase()==="export"?console.log("Export button clicked implement xlsx file"):alert(`${s} clicked!`)};return e.jsx(t,{sx:{mt:2},children:e.jsxs(C,{children:[e.jsxs(L,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",p:2,gap:2},children:[e.jsxs(t,{sx:{display:"flex",alignItems:"center",gap:2,cursor:"pointer"},onClick:()=>{m(`${r||".."}`,{relative:"path"})},children:[l&&e.jsx(u,{color:f.palette.primary.main}),e.jsx(v,{variant:"subtitle1",fontWeight:"bold",children:n})]}),c&&e.jsxs(t,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:2,flex:1},children:[i&&i,e.jsx(k,{variant:"contained",size:"large",loading:x,onClick:g,children:s}),p]}),d]}),o]})})};export{I as G};
