"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[9844],{19844:(e,a,t)=>{t.r(a),t.d(a,{default:()=>g});var l=t(69060),n=t(66152),s=t(61628),r=t(4836),c=t(95705),o=t(66156),d=t(61180),i=t(78256),u=t(82496);const g=e=>{let{modalOpen:a,currentTags:t,onCloseAndUpdate:g,bucketName:b}=e;const p=(0,o.Ab)(),[h,m]=(0,l.useState)(""),[w,x]=(0,l.useState)(""),[k,T]=(0,l.useState)(!1);return(0,u.jsx)(r.c,{modalOpen:a,title:"Add New Tag ",onClose:()=>{g(!1)},titleIcon:(0,u.jsx)(n.sfl,{}),children:(0,u.jsxs)(n.yE_,{withBorders:!1,containerPadding:!1,children:[(0,u.jsxs)(n.kvh,{sx:{marginBottom:15},children:[(0,u.jsx)("strong",{children:"Bucket"}),": ",b]}),(0,u.jsx)(n.q22,{value:h,label:"New Tag Key",id:"newTagKey",name:"newTagKey",placeholder:"Enter New Tag Key",onChange:e=>{m(e.target.value)}}),(0,u.jsx)(n.q22,{value:w,label:"New Tag Label",id:"newTagLabel",name:"newTagLabel",placeholder:"Enter New Tag Label",onChange:e=>{x(e.target.value)}}),(0,u.jsxs)(n.yeN,{item:!0,xs:12,sx:s.W2.modalButtonBar,children:[(0,u.jsx)(n.qaq,{id:"clear",type:"button",variant:"regular",onClick:()=>{x(""),m("")},label:"Clear"}),(0,u.jsx)(n.qaq,{id:"save-add-bucket-tag",type:"submit",variant:"callAction",color:"primary",disabled:""===w.trim()||""===h.trim()||k,onClick:()=>{T(!0);const e={};e[h]=w;const a={...t,...e};d.m.buckets.putBucketTags(b,{tags:a}).then((()=>{T(!1),g(!0)})).catch((e=>{p((0,c.op)((0,i.K)(e.error))),T(!1)}))},label:"Save"})]})]})})}}}]);
//# sourceMappingURL=9844.7ee4f681.chunk.js.map