"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[6387],{53271:function($,v,e){e.r(v);var P=e(90228),s=e.n(P),g=e(87999),D=e.n(g),A=e(48305),O=e.n(A),C=e(50959),m=e(49547),b=e(35748),T=e(19014),j=e(50925),I=e(94675),R=e(2733),M=e(17885),U=e(66001),c=e.n(U),z=e(8776),n=e(11527),B=function(a){var L=(0,C.useState)(c().createEditorState("")),f=O()(L,2),d=f[0],i=f[1],W=j.Z.useForm(),x=O()(W,1),l=x[0],E=a.values;(0,C.useEffect)(function(){i(c().createEditorState(E.protocolContent?E.protocolContent:"")),l.resetFields(),l.setFieldsValue(E)},[l,a]);var F=function(){l.submit()},K=function(){a.onCancel()},y=function(){var t=D()(s()().mark(function o(_){var r;return s()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:r=JSON.parse(JSON.stringify(_)),r.protocolContent=d.toHTML(),a.onSubmit(r);case 3:case"end":return u.stop()}},o)}));return function(_){return t.apply(this,arguments)}}(),S=["undo","redo","separator","font-size","line-height","letter-spacing","separator","text-color","bold","italic","underline","strike-through","separator","superscript","subscript","remove-styles","emoji","separator","text-indent","text-align","separator","headings","list-ul","list-ol","blockquote","code","separator","link","separator","hr","separator","clear"],Z=function(){var t=D()(s()().mark(function o(_){var r,h;return s()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:r=[".mp4",".mkv",".avi",".mov",".wmv",".flv",".webm",".m4v",".3gp",".3g2"],h=_.toLowerCase(),r.some(function(N){return h.endsWith(N)})?i(M.ContentUtils.insertMedias(d,[{type:"VIDEO",url:_}])):i(M.ContentUtils.insertMedias(d,[{type:"IMAGE",url:_}]));case 3:case"end":return p.stop()}},o)}));return function(_){return t.apply(this,arguments)}}(),G=["separator",{key:"FilesManagerImage",title:"\u4E0A\u4F20\u56FE\u7247/\u89C6\u9891",html:null,text:(0,n.jsx)(R.Z,{fileType:"image",mode:"",imagesShow:!1,onChange:Z,count:1}),onClick:function(){console.log("Hello World!")}}];return(0,n.jsx)(I.Z,{width:1200,title:"\u534F\u8BAE\u5185\u5BB9",open:a.open,forceRender:!0,destroyOnClose:!0,onOk:F,onCancel:K,children:(0,n.jsxs)(m.A,{form:l,submitter:!1,layout:"horizontal",onFinish:y,children:[(0,n.jsx)(b.Z,{name:"id",label:"ID",disabled:!0,hidden:!0}),(0,n.jsx)(T.Z,{width:300,name:"protocolName",label:"\u534F\u8BAE\u540D\u79F0",placeholder:"\u534F\u8BAE\u540D\u79F0",rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}]}),(0,n.jsx)(m.A.Group,{children:(0,n.jsx)(m.A.Item,{name:"protocolContent",children:(0,n.jsx)("div",{className:"border-solid border-2 border-indigo-600",children:(0,n.jsx)(c(),{value:d,controls:S,extendControls:G,onChange:function(o){i(o)}})})})})]})})};v.default=B}}]);
