Module 24094

850 characters · in ab1461c2b4cb9dd9.js
Dependencies
Required by (0)none
Lazily required by (0)none
Lazily requires (0)none
Source Raw
function(e,t,l){l.d(t,{default:()=>g});var i=l(627968),n=l(64700),r=l(296489),s=l.n(r),u=l(820284),a=l(913122),d=l(513461),c=l(241499),p=l(242273),h=l(652215),o=l(375708);let g=function(e){let{field:t,onSave:l,onClose:r,guild:g}=e,[v,_]=n.useState(t?.values!=null?t?.values.map(e=>({id:s()(),value:e})):[{id:s()(),value:""}]),[f,A]=n.useState(null),C=async()=>{null!=f&&A(null);let e=v.map(e=>e.value.trim()).filter(e=>""!==e);if(0===e.length)return void A(o.intl.string(o.t.TCHkcd));let t={field_type:d.rX.TERMS,label:o.intl.string(o.t["9suSIA"]),values:e,required:!0};try{await l(t),r()}catch(e){A(new a.LG(e).getAnyErrorMessage())}};return(0,i.jsx)(u.A,{page:h.liQ.GUILD_RULES_CREATE_MODAL,children:(0,i.jsx)(p.A,{...e,errorText:f,title:o.intl.string(o.t["3pz9t3"]),onCancel:r,onConfirm:C,children:(0,i.jsx)(c._,{guild:g,rules:v,setRules:_})})})}}