"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[352],{70352:(e,i,t)=>{t.r(i),t.d(i,{default:()=>f});var s=t(69060),c=t(51560),n=t(66152),a=t(19536),l=t(21124),o=t(3992),r=t(99748),d=t(95705),b=t(2432),_=t(66156),u=t(84612),T=t(3428),O=t(61180),x=t(78256),h=t(48504),C=t(82496);const E=(0,r.c)(s.lazy((()=>t.e(6532).then(t.bind(t,96532))))),m=(0,r.c)(s.lazy((()=>t.e(3400).then(t.bind(t,3400))))),j=(0,r.c)(s.lazy((()=>t.e(1496).then(t.bind(t,31496))))),I=(0,r.c)(s.lazy((()=>t.e(6186).then(t.bind(t,46186))))),S=(0,r.c)(s.lazy((()=>t.e(428).then(t.bind(t,428))))),k=(0,r.c)(s.lazy((()=>t.e(7904).then(t.bind(t,87904))))),p=(0,r.c)(s.lazy((()=>t.e(9572).then(t.bind(t,19572))))),f=()=>{var e;const i=(0,_.Ab)(),t=(0,c.i6)(),r=(0,c.W4)(),f=(0,c.IT)(),y=(0,a.w1)(d.wB),N=(0,a.w1)(b.qO),A=(0,a.w1)(b.yi),g=(0,a.w1)(d.zd),[w,U]=(0,s.useState)(!1),[B,v]=(0,s.useState)(!1),G=r.bucketName||"",L=(0,o.i)(G,l.kZ),F=(0,o.i)(G,l.DD);(0,s.useEffect)((()=>{i((0,d.i8)("bucket_details"))}),[]),(0,s.useEffect)((()=>{w||(i((0,b.E3)(!0)),U(!0))}),[w,i,U]),(0,s.useEffect)((()=>{N&&O.m.buckets.bucketInfo(G).then((e=>{i((0,b.E3)(!1)),i((0,b.Km)(e.data))})).catch((e=>{i((0,b.E3)(!1)),i((0,d.aW)((0,x.K)(e)))}))}),[G,N,i]);let P="/buckets/".concat(G);const R={events:"/admin/events",replication:"/admin/replication",lifecycle:"/admin/lifecycle",access:"/admin/access",prefix:"/admin/prefix"},z=e=>{let i=R[e];return i=i?"".concat(P).concat(i):"".concat(P).concat("/admin/summary"),i};return(0,C.jsxs)(s.Fragment,{children:[B&&(0,C.jsx)(E,{deleteOpen:B,selectedBucket:G,closeDeleteModalAndRefresh:e=>{(e=>{v(!1),e&&t("/buckets")})(e)}}),(0,C.jsx)(T.c,{label:(0,C.jsx)(n.y_F,{label:"Buckets",onClick:()=>t("/buckets")}),actions:(0,C.jsxs)(s.Fragment,{children:[(0,C.jsx)(u.c,{tooltip:F?"Browse Bucket":(0,l.q4)(l.M1[l.m0.BUCKET_VIEWER],"browsing this bucket"),children:(0,C.jsx)(n.qaq,{id:"switch-browse-view","aria-label":"Browse Bucket",onClick:()=>{t("/browser/".concat(G))},icon:(0,C.jsx)(n.imB,{style:{width:20,height:20,marginTop:-3}}),style:{padding:"0 10px"},disabled:!F})}),(0,C.jsx)(h.c,{})]})}),(0,C.jsxs)(n._al,{children:[(0,C.jsx)(n.g1F,{icon:(0,C.jsx)(s.Fragment,{children:(0,C.jsx)(n.Gme,{width:40})}),title:G,subTitle:(0,C.jsxs)(o.K,{scopes:[l.Oi.S3_GET_BUCKET_POLICY,l.Oi.S3_GET_ACTIONS],resource:G,children:[(0,C.jsx)("span",{style:{fontSize:15},children:"Access: "}),(0,C.jsx)("span",{style:{fontWeight:600,fontSize:15,textTransform:"capitalize"},children:null===A||void 0===A||null===(e=A.access)||void 0===e?void 0:e.toLowerCase()})]}),actions:(0,C.jsxs)(s.Fragment,{children:[(0,C.jsx)(o.K,{scopes:l.kZ,resource:G,errorProps:{disabled:!0},children:(0,C.jsx)(u.c,{tooltip:L?"":(0,l.q4)([l.Oi.S3_DELETE_BUCKET,l.Oi.S3_FORCE_DELETE_BUCKET],"deleting this bucket"),children:(0,C.jsx)(n.qaq,{id:"delete-bucket-button",onClick:()=>{v(!0)},label:"Delete Bucket",icon:(0,C.jsx)(n.g8$,{}),variant:"secondary",disabled:!L})})}),(0,C.jsx)(n.qaq,{id:"refresh-bucket-info",onClick:()=>{i((0,b.E3)(!0))},label:"Refresh",icon:(0,C.jsx)(n.W5k,{})})]}),sx:{marginBottom:15}}),(0,C.jsx)(n.kvh,{children:(0,C.jsx)(n.kZJ,{currentTabOrPath:f.pathname,useRouteTabs:!0,onTabClick:e=>{t(e)},options:[{tabConfig:{label:"Summary",id:"summary",to:z("summary")}},{tabConfig:{label:"Events",id:"events",disabled:!(0,o.i)(G,[l.Oi.S3_GET_BUCKET_NOTIFICATIONS,l.Oi.S3_PUT_BUCKET_NOTIFICATIONS,l.Oi.S3_GET_ACTIONS,l.Oi.S3_PUT_ACTIONS]),to:z("events")}},{tabConfig:{label:"Replication",id:"replication",disabled:!y||g.enabled&&g.curSite||!(0,o.i)(G,[l.Oi.S3_GET_REPLICATION_CONFIGURATION,l.Oi.S3_PUT_REPLICATION_CONFIGURATION,l.Oi.S3_GET_ACTIONS,l.Oi.S3_PUT_ACTIONS]),to:z("replication")}},{tabConfig:{label:"Lifecycle",id:"lifecycle",disabled:!y||!(0,o.i)(G,[l.Oi.S3_GET_LIFECYCLE_CONFIGURATION,l.Oi.S3_PUT_LIFECYCLE_CONFIGURATION,l.Oi.S3_GET_ACTIONS,l.Oi.S3_PUT_ACTIONS]),to:z("lifecycle")}},{tabConfig:{label:"Access",id:"access",disabled:!(0,o.i)(G,[l.Oi.ADMIN_GET_POLICY,l.Oi.ADMIN_LIST_USER_POLICIES,l.Oi.ADMIN_LIST_USERS]),to:z("access")}},{tabConfig:{label:"Anonymous",id:"anonymous",disabled:!(0,o.i)(G,[l.Oi.S3_GET_BUCKET_POLICY,l.Oi.S3_GET_ACTIONS]),to:z("prefix")}}],routes:(0,C.jsxs)(c.c5,{children:[(0,C.jsx)(c.kX,{path:"summary",element:(0,C.jsx)(I,{})}),(0,C.jsx)(c.kX,{path:"events",element:(0,C.jsx)(S,{})}),y&&(0,C.jsx)(c.kX,{path:"replication",element:(0,C.jsx)(k,{})}),y&&(0,C.jsx)(c.kX,{path:"lifecycle",element:(0,C.jsx)(p,{})}),(0,C.jsx)(c.kX,{path:"access",element:(0,C.jsx)(j,{})}),(0,C.jsx)(c.kX,{path:"prefix",element:(0,C.jsx)(m,{})}),(0,C.jsx)(c.kX,{path:"*",element:(0,C.jsx)(c.YX,{to:"/buckets/".concat(G,"/admin/summary")})})]})})})]})]})}},99748:(e,i,t)=>{t.d(i,{c:()=>n});var s=t(69060),c=t(82496);const n=function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(t){return(0,c.jsx)(s.Suspense,{fallback:i,children:(0,c.jsx)(e,{...t})})}}}}]);
//# sourceMappingURL=352.57c4d53b.chunk.js.map