(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[501],{26977:function(e,l,t){Promise.resolve().then(t.bind(t,79477))},79477:function(e,l,t){"use strict";t.r(l),t.d(l,{default:function(){return p}});var i=t(57437),n=t(2265),o=t(76842),r=t(43402),s=t(66310),u=t(16869),c=t(33068),d=t(24033),a=t(86854);function p(){let{Paragraph:e}=o.Typography,{trigger:l}=(0,c.Z)("/v1/upload/streamers",u.wG),t=(0,d.useRouter)(),p=(0,n.useRef)(),[m,_]=(0,n.useState)("inset");return(0,n.useEffect)(()=>{let e=(0,s.q)(s.f.lg,{match:()=>{_("left")},unmatch:()=>{_("top")}});return()=>e()},[]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{style:{display:"flex",flexDirection:"row-reverse",paddingRight:12},children:(0,i.jsx)(o.zx,{onClick:()=>{var e;null===(e=p.current)||void 0===e||e.submitForm()},type:"primary",icon:(0,i.jsx)(r.Z,{size:"large"}),theme:"solid",style:{marginTop:12,marginRight:4},children:"创建模板"})}),(0,i.jsx)("main",{style:{backgroundColor:"var(--semi-color-bg-0)",display:"flex",justifyContent:"space-around"},children:(0,i.jsx)(o.Form,{autoScrollToError:!0,onSubmit:async n=>{try{var r,s,u,c,d,a,p,m,_,v,y,h;let e={template_name:n.template_name,user:n.user,copyright:n.copyright,id:n.id,source:null!==(r=n.source)&&void 0!==r?r:"",tid:n.tid[1],cover:null!==(s=n.cover)&&void 0!==s?s:"",title:null!==(u=n.title)&&void 0!==u?u:"",desc:null!==(c=n.desc)&&void 0!==c?c:"",dynamic:null!==(d=n.dynamic)&&void 0!==d?d:"",tags:null!==(a=n.tag)&&void 0!==a?a:"",interactive:null!==(p=n.interactive)&&void 0!==p?p:0,dolby:null!==(m=n.dolby)&&void 0!==m?m:0,lossless_music:null!==(_=n.lossless_music)&&void 0!==_?_:0,up_selection_reply:null!==(v=n.up_selection_reply)&&void 0!==v&&v,up_close_reply:null!==(y=n.up_close_reply)&&void 0!==y&&y,up_close_danmu:null!==(h=n.up_close_danmu)&&void 0!==h&&h,open_elec:n.open_elec,no_reprint:n.no_reprint,mission_id:n.mission_id,dtime:n.dtime};await l(e),o.FN.success("创建成功"),t.push("/upload-manager")}catch(l){throw o.P_.error({title:"创建失败",content:(0,i.jsx)(e,{style:{maxWidth:450},children:l.message}),style:{width:"min-content"}}),l}},component:a.Z,getFormApi:e=>p.current=e,labelWidth:"180px",labelPosition:m})})]})}}},function(e){e.O(0,[368,713,833,971,472,744],function(){return e(e.s=26977)}),_N_E=e.O()}]);