import{N as c,n as i,e,B as t,$ as d,a0 as h,aW as p,S as x,T as m,a2 as y,k as j,dl as f,P as o}from"./index-_6SmYgWK.js";const g=({flowName:s,flowData:r,onChatflowCopy:n})=>{const a=c(),l=i();return e.jsxs(e.Fragment,{children:[e.jsx(t,{children:e.jsx(d,{title:"Back",sx:{borderRadius:"50%"},children:e.jsx(h,{variant:"rounded",sx:{...a.typography.commonAvatar,...a.typography.mediumAvatar,transition:"all .2s ease-in-out",background:a.palette.secondary.light,color:a.palette.secondary.dark,"&:hover":{background:a.palette.secondary.dark,color:a.palette.secondary.light}},color:"inherit",onClick:()=>l(-1),children:e.jsx(p,{stroke:1.5,size:"1.3rem"})})})}),e.jsx(t,{sx:{flexGrow:1},children:e.jsx(x,{flexDirection:"row",children:e.jsx(m,{sx:{fontSize:"1.5rem",fontWeight:600,ml:2},children:s})})}),e.jsx(y,{permission:"chatflows:create,agentflows.create",children:e.jsx(t,{children:e.jsx(j,{color:"secondary",variant:"contained",title:"Use Chatflow",onClick:()=>n(r),startIcon:e.jsx(f,{}),children:"Use Template"})})})]})};g.propTypes={flowName:o.string,flowData:o.object,onChatflowCopy:o.func};export{g as M};
