"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[9460],{29460:(e,a,l)=>{l.r(a),l.d(a,{default:()=>b});var t=l(69060),s=l(66152),c=l(61180),n=l(78256),i=l(61628),r=l(95705),o=l(66156),d=l(4836),u=l(82496);const b=e=>{let{modalOpen:a,onClose:l,bucket:b,toEdit:p,initial:h}=e;const x=(0,o.Ab)(),[k,m]=(0,t.useState)(h);return(0,u.jsx)(t.Fragment,{children:(0,u.jsxs)(d.c,{modalOpen:a,title:"Edit Anonymous Access Rule for ".concat("".concat(b,"/").concat(p||"")),onClose:l,titleIcon:(0,u.jsx)(s.MV9,{}),children:[(0,u.jsx)(s.yE_,{containerPadding:!1,withBorders:!1,children:(0,u.jsx)(s.M1e,{id:"access",name:"Access",onChange:e=>{m(e)},label:"Access",value:k,options:[{label:"readonly",value:"readonly"},{label:"writeonly",value:"writeonly"},{label:"readwrite",value:"readwrite"}],disabled:!1})}),(0,u.jsxs)(s.yeN,{item:!0,xs:12,sx:i.W2.modalButtonBar,children:[(0,u.jsx)(s.qaq,{id:"clear",type:"button",variant:"regular",onClick:()=>{m(h)},label:"Clear"}),(0,u.jsx)(s.qaq,{id:"save",type:"submit",variant:"callAction",onClick:()=>{c.m.bucket.setAccessRuleWithBucket(b,{prefix:p,access:k}).then((()=>{l()})).catch((e=>{x((0,r.aW)((0,n.K)(e.error))),l()}))},label:"Save"})]})]})})}}}]);
//# sourceMappingURL=9460.be94fd27.chunk.js.map