"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[1303],{1303:(e,a,t)=>{t.r(a),t.d(a,{default:()=>g});var l=t(65043),n=t(89923),s=t(77403),r=t(94141),c=t(64159),d=t(20554),o=t(56629),i=t(53518),u=t(70579);const g=e=>{let{modalOpen:a,currentTags:t,onCloseAndUpdate:g,bucketName:b}=e;const p=(0,d.jL)(),[h,w]=(0,l.useState)(""),[x,m]=(0,l.useState)(""),[j,k]=(0,l.useState)(!1);return(0,u.jsx)(r.A,{modalOpen:a,title:"Add New Tag ",onClose:()=>{g(!1)},titleIcon:(0,u.jsx)(n.b_$,{}),children:(0,u.jsxs)(n.Hbc,{withBorders:!1,containerPadding:!1,children:[(0,u.jsxs)(n.azJ,{sx:{marginBottom:15},children:[(0,u.jsx)("strong",{children:"Bucket"}),": ",b]}),(0,u.jsx)(n.cl_,{value:h,label:"New Tag Key",id:"newTagKey",name:"newTagKey",placeholder:"Enter New Tag Key",onChange:e=>{w(e.target.value)}}),(0,u.jsx)(n.cl_,{value:x,label:"New Tag Label",id:"newTagLabel",name:"newTagLabel",placeholder:"Enter New Tag Label",onChange:e=>{m(e.target.value)}}),(0,u.jsxs)(n.xA9,{item:!0,xs:12,sx:s.Uz.modalButtonBar,children:[(0,u.jsx)(n.$nd,{id:"clear",type:"button",variant:"regular",onClick:()=>{m(""),w("")},label:"Clear"}),(0,u.jsx)(n.$nd,{id:"save-add-bucket-tag",type:"submit",variant:"callAction",color:"primary",disabled:""===x.trim()||""===h.trim()||j,onClick:()=>{k(!0);const e={};e[h]=x;const a={...t,...e};o.F.buckets.putBucketTags(b,{tags:a}).then((()=>{k(!1),g(!0)})).catch((e=>{p((0,c.Dy)((0,i.S)(e.error))),k(!1)}))},label:"Save"})]})]})})}}}]);
//# sourceMappingURL=1303.12f6ca82.chunk.js.map