"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[6799],{96799:(e,t,l)=>{l.r(t),l.d(t,{default:()=>p});var s=l(65043),n=l(89923),a=l(56629),o=l(53518),r=l(77403),i=l(64159),c=l(21383),d=l(94141),u=l(70579);const p=e=>{let{modalOpen:t,onClose:l,bucket:p,toEdit:h,initial:b}=e;const m=(0,c.jL)(),[x,C]=(0,s.useState)(b);return(0,u.jsx)(s.Fragment,{children:(0,u.jsxs)(d.A,{modalOpen:t,title:`Edit Anonymous Access Rule for ${p}/${h||""}`,onClose:l,titleIcon:(0,u.jsx)(n.No_,{}),children:[(0,u.jsx)(n.Hbc,{containerPadding:!1,withBorders:!1,children:(0,u.jsx)(n.l6P,{id:"access",name:"Access",onChange:e=>{C(e)},label:"Access",value:x,options:[{label:"readonly",value:"readonly"},{label:"writeonly",value:"writeonly"},{label:"readwrite",value:"readwrite"}],disabled:!1})}),(0,u.jsxs)(n.xA9,{item:!0,xs:12,sx:r.Uz.modalButtonBar,children:[(0,u.jsx)(n.$nd,{id:"clear",type:"button",variant:"regular",onClick:()=>{C(b)},label:"Clear"}),(0,u.jsx)(n.$nd,{id:"save",type:"submit",variant:"callAction",onClick:()=>{a.F.bucket.setAccessRuleWithBucket(p,{prefix:h,access:x}).then((()=>{l()})).catch((e=>{m((0,i.C9)((0,o.S)(e.error))),l()}))},label:"Save"})]})]})})}},94141:(e,t,l)=>{l.d(t,{A:()=>d});var s=l(65043),n=l(22166),a=l(89923),o=l(21383),r=l(64159),i=l(49555),c=l(70579);const d=e=>{let{onClose:t,modalOpen:l,title:d,children:u,wideLimit:p=!0,titleIcon:h=null,iconColor:b="default",sx:m}=e;const x=(0,o.jL)(),[C,f]=(0,s.useState)(!1),j=(0,n.d4)((e=>e.system.modalSnackBar));(0,s.useEffect)((()=>{x((0,r.h0)(""))}),[x]),(0,s.useEffect)((()=>{if(j){if(""===j.message)return void f(!1);"error"!==j.type&&f(!0)}}),[j]);let v="";return j&&(v=j.detailedErrorMsg,(""===v||v&&v.length<5)&&(v=j.message)),(0,c.jsxs)(a.ngX,{onClose:t,open:l,title:d,titleIcon:h,widthLimit:p,sx:m,iconColor:b,children:[(0,c.jsx)(i.A,{isModal:!0}),(0,c.jsx)(a.qb_,{onClose:()=>{f(!1),x((0,r.h0)(""))},open:C,message:v,mode:"inline",variant:"error"===j.type?"error":"default",autoHideDuration:"error"===j.type?10:5,condensed:!0}),u]})}}}]);
//# sourceMappingURL=6799.c970e1e8.chunk.js.map