import{a as l,b as s}from"./chunk-RJW4E7YI.mjs";import{a as d}from"./chunk-I2S4ZSV7.mjs";import{a as g}from"./chunk-LCWS7MKL.mjs";import{CircledAvatar as x}from"@baseapp-frontend/design-system/components/web/avatars";import{FileUploadButton as E}from"@baseapp-frontend/design-system/components/web/buttons";import{TextField as I}from"@baseapp-frontend/design-system/components/web/inputs";import{Box as U,Button as F,Typography as M,useTheme as T}from"@mui/material";import{jsx as a,jsxs as c}from"react/jsx-runtime";var R=function(e){var n=e.control,t=e.FORM_VALUE,p=e.handleRemoveImage,r=e.imageError,i=e.isMutationInFlight,h=e.setValue,u=e.trigger,v=e.watch,m=T(),o=v(t.image),A=g(o);return c(U,{sx:{display:"grid",gap:m.spacing(1.5),padding:m.spacing(2)},children:[c(d,{children:[a(x,{src:A,width:144,height:144,hasError:!!r}),r&&a("div",{className:"text-center",children:a(M,{color:"error.main",variant:"caption",children:r.message})}),a(E,{control:n,disabled:i,name:t.image,setFile:h,accept:l,maxSize:s,label:o?"Change Avatar":"Upload Avatar"}),o&&a(F,{variant:"text",color:"error",disabled:i,onClick:p,children:"Remove"})]}),a(I,{label:"Group Name",inputProps:{maxLength:20},control:n,disabled:i,name:t.title,className:"h-[min-content]",onKeyUp:function(){u(t.title)}})]})},N=R;export{N as a};
//# sourceMappingURL=chunk-AYAYQ6QO.mjs.map