"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[75908],{475908(e,i,n){n.r(i),n.d(i,{default:()=>_});var t=n(274934),s=n(843871),a=n(938984),l=n(247816),o=n(318087),r=n(950804),u=n(120197),A=n(470070),c=n(384783);const d=(0,l.A)(a.A)`
  color: ${({theme:{motifPalette:{text01:e}}})=>e} !important;
  padding-right: ${({theme:{spacing:e}})=>e["spacing-s"]};
`,m=(0,l.A)("button")`
  display: none;
`,C=r.A.object().shape({name:r.A.string().label("SETTINGS_MODAL_DUPLICATE_LABEL_NEW_NAME").required()}),_=({onCancel:e,onConfirm:i,isOpen:n=null,name:a=null})=>(0,t.jsx)(A.sA,{id:"COMMON_COPY",children:l=>(0,t.jsx)(s.l1,{enableReinitialize:!0,initialValues:{name:`${a} ${l}`},validationSchema:C,onSubmit:e=>i(e),children:({errors:s,handleSubmit:l,submitCount:r,touched:C,values:_})=>(0,t.jsx)(c.A,{actions:[{text:(0,t.jsx)(A.sA,{id:"COMMON_ACTION_CANCEL"}),type:"button",onClick:e},{disabled:(0,o.If)("name",s,C,r),text:(0,t.jsx)(A.sA,{id:"COMMON_ACTION_CONFIRM"}),type:"button",variant:"primary",onClick:()=>i(_)}],isOpen:n,size:"small",title:(0,t.jsx)(d,{size:"xlarge-1",isTruncated:!0,children:(0,t.jsx)(A.sA,{id:"SETTINGS_MODAL_DUPLICATE_TITLE",values:{name:a}})}),onRequestClose:e,children:(0,t.jsxs)("form",{onSubmit:e=>{e.stopPropagation(),l()},children:[(0,t.jsx)(u.A,{autoFocus:!0,full:!0,label:"SETTINGS_MODAL_DUPLICATE_LABEL_NEW_NAME",name:"name",size:"large"}),(0,t.jsx)(m,{})]})})})})}}]);