"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[3643],{63643:(e,t,n)=>{n.r(t),n.d(t,{default:()=>_});var a=n(296540),i=n(951272),l=n(927099),s=n(71479),r=n(870443),o=n(388151),m=n(459449),u=n(333080),c=n(705426);const A=(0,s.A)(l.A)`
  color: ${({theme:{motifPalette:{text01:e}}})=>e} !important;
  padding-right: ${({theme:{spacing:e}})=>e["spacing-s"]};
`,E=(0,s.A)("button")`
  display: none;
`,C=r.A.object().shape({name:r.A.string().label("SETTINGS_MODAL_DUPLICATE_LABEL_NEW_NAME").required()}),_=({onCancel:e,onConfirm:t,isOpen:n=null,name:l=null})=>a.createElement(m.sA,{id:"COMMON_COPY"},s=>a.createElement(i.l1,{enableReinitialize:!0,initialValues:{name:`${l} ${s}`},validationSchema:C,onSubmit:e=>t(e)},({errors:i,handleSubmit:s,submitCount:r,touched:C,values:_})=>a.createElement(c.A,{actions:[{text:a.createElement(m.sA,{id:"COMMON_ACTION_CANCEL"}),type:"button",onClick:e},{disabled:(0,u.If)("name",i,C,r),text:a.createElement(m.sA,{id:"COMMON_ACTION_CONFIRM"}),type:"button",variant:"primary",onClick:()=>t(_)}],isOpen:n,size:"small",title:a.createElement(A,{size:"header-s",truncate:!0},a.createElement(m.sA,{id:"SETTINGS_MODAL_DUPLICATE_TITLE",values:{name:l}})),onRequestClose:e},a.createElement("form",{onSubmit:e=>{e.stopPropagation(),s()}},a.createElement(o.A,{autoFocus:!0,full:!0,label:"SETTINGS_MODAL_DUPLICATE_LABEL_NEW_NAME",name:"name",size:"large"}),a.createElement(E,null)))))}}]);