"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[8455],{58455:function(e,n,a){a.r(n);var s=a(29439),t=a(1413),l=a(72791),c=a(56028),o=a(61889),i=a(36151),r=a(11135),d=a(25787),u=a(23814),m=a(81207),p=a(90673),f=a(38734),Z=a(87995),h=a(25469),x=a(80184);n.default=(0,d.Z)((function(e){return(0,r.Z)((0,t.Z)((0,t.Z)({},u.ID),u.bK))}))((function(e){var n=e.modalOpen,a=e.onClose,t=e.classes,r=e.bucket,d=e.toEdit,u=e.initial,v=(0,h.TL)(),j=(0,l.useState)(u),g=(0,s.Z)(j,2),k=g[0],C=g[1];return(0,x.jsx)(l.Fragment,{children:(0,x.jsx)(c.Z,{modalOpen:n,title:"Edit Access Rule for ".concat("".concat(r,"/").concat(d||"")),onClose:a,titleIcon:(0,x.jsx)(f.sR0,{}),children:(0,x.jsxs)(o.ZP,{container:!0,children:[(0,x.jsx)(o.ZP,{item:!0,xs:12,className:t.spacerTop,children:(0,x.jsx)(p.Z,{id:"access",name:"Access",onChange:function(e){C(e.target.value)},label:"Access",value:k,options:[{label:"readonly",value:"readonly"},{label:"writeonly",value:"writeonly"},{label:"readwrite",value:"readwrite"}],disabled:!1})}),(0,x.jsxs)(o.ZP,{item:!0,xs:12,className:t.modalButtonBar,children:[(0,x.jsx)(i.Z,{type:"button",color:"primary",variant:"outlined",onClick:function(){C(u)},children:"Clear"}),(0,x.jsx)(i.Z,{type:"submit",variant:"contained",color:"primary",onClick:function(){m.Z.invoke("PUT","/api/v1/bucket/".concat(r,"/access-rules"),{prefix:d,access:k}).then((function(e){a()})).catch((function(e){v((0,Z.Ih)(e)),a()}))},children:"Save"})]})]})})})}))},56028:function(e,n,a){var s=a(29439),t=a(1413),l=a(72791),c=a(60364),o=a(13400),i=a(55646),r=a(5574),d=a(65661),u=a(39157),m=a(11135),p=a(25787),f=a(23814),Z=a(25469),h=a(29823),x=a(28057),v=a(87995),j=a(80184);n.Z=(0,p.Z)((function(e){return(0,m.Z)((0,t.Z)((0,t.Z)({},f.Qw),{},{content:{padding:25,paddingBottom:0},customDialogSize:{width:"100%",maxWidth:765}},f.sN))}))((function(e){var n=e.onClose,a=e.modalOpen,m=e.title,p=e.children,f=e.classes,g=e.wideLimit,k=void 0===g||g,C=e.noContentPadding,b=e.titleIcon,y=void 0===b?null:b,N=(0,Z.TL)(),w=(0,l.useState)(!1),B=(0,s.Z)(w,2),E=B[0],M=B[1],S=(0,c.v9)((function(e){return e.system.modalSnackBar}));(0,l.useEffect)((function(){N((0,v.MK)(""))}),[N]),(0,l.useEffect)((function(){if(S){if(""===S.message)return void M(!1);"error"!==S.type&&M(!0)}}),[S]);var P=k?{classes:{paper:f.customDialogSize}}:{maxWidth:"lg",fullWidth:!0},T="";return S&&(T=S.detailedErrorMsg,(""===S.detailedErrorMsg||S.detailedErrorMsg.length<5)&&(T=S.message)),(0,j.jsxs)(r.Z,(0,t.Z)((0,t.Z)({open:a,classes:f},P),{},{scroll:"paper",onClose:function(e,a){"backdropClick"!==a&&n()},className:f.root,children:[(0,j.jsxs)(d.Z,{className:f.title,children:[(0,j.jsxs)("div",{className:f.titleText,children:[y," ",m]}),(0,j.jsx)("div",{className:f.closeContainer,children:(0,j.jsx)(o.Z,{"aria-label":"close",id:"close",className:f.closeButton,onClick:n,disableRipple:!0,size:"small",children:(0,j.jsx)(h.Z,{})})})]}),(0,j.jsx)(x.Z,{isModal:!0}),(0,j.jsx)(i.Z,{open:E,className:f.snackBarModal,onClose:function(){M(!1),N((0,v.MK)(""))},message:T,ContentProps:{className:"".concat(f.snackBar," ").concat(S&&"error"===S.type?f.errorSnackBar:"")},autoHideDuration:S&&"error"===S.type?1e4:5e3}),(0,j.jsx)(u.Z,{className:C?"":f.content,children:p})]}))}))}}]);
//# sourceMappingURL=8455.01f5b771.chunk.js.map