import{a2 as m,j as n,d as a}from"./index-C88DWJny.js";import{M as p}from"./ModifiedStatusAction-BUIqf1yi.js";const x=({modifiedGroups:e,undoChange:r,closePanel:o,onSubmit:u,loading:t,disabled:l,actionText:s,isEdit:i=!1})=>{const c=e.size?`Save ${e.size} group ${m("change",e.size)}`:"Save changes";return n.jsxs(n.Fragment,{children:[i&&e.size?n.jsx(p,{modifiedCount:e.size,onUndoChange:r,itemName:"group",actionText:s}):null,n.jsx(a.Button,{appearance:"base",onClick:o,className:"u-no-margin--bottom",children:"Cancel"}),n.jsx(a.ActionButton,{appearance:"positive",onClick:u,className:"u-no-margin--bottom",disabled:l||t,loading:t,children:s?"Confirm":c})]})},g=({formik:e})=>n.jsxs(a.Form,{onSubmit:e.handleSubmit,children:[n.jsx(a.Input,{type:"submit",hidden:!0,value:"Hidden input"}),n.jsx(a.Input,{type:"text",label:"Name",required:!0,autoFocus:!0,id:"name",name:"name",onBlur:e.handleBlur,onChange:e.handleChange,value:e.values.name,error:e.touched.name?e.errors.name:null,placeholder:"Enter name"})]});export{x as G,g as N};
