import{u as G}from"./index-f94fe539-1782572373740v=1.0.0.js";import K from"./DataEntry-730f6455-1782572373740v=1.0.0.js";import Q from"./DataImport-f7aae7f4-1782572373740v=1.0.0.js";import U from"./ScheduleInformation-14ec53f6-1782572373740v=1.0.0.js";import X from"./ScheduleSelector-4c4cf76c-1782572373740v=1.0.0.js";import{h as Y}from"./eventListApi-0bc79350-1782572373740v=1.0.0.js";import{a as Z,_ as $}from"./index-f6f689f9-1782572373740v=1.0.0.js";import{y as ee,c as a,r as l,h as te,i as oe,w as ne,m as ae,al as p,z as s,A as f,u as t,R as d,J as E,M as n,B as ue,I as m,O as le}from"./vendor-866bb149-1782572373740v=1.0.0.js";import"./style-72b27c88-1782572373740v=1.0.0.js";import"./index-13a40fd6-1782572373740v=1.0.0.js";import"./eleVendor-48a7d3b8-1782572373740v=1.0.0.js";import"./useEventManualExport-d8fc55f4-1782572373740v=1.0.0.js";import"./vue-draggable-plus-31efe107-1782572373740v=1.0.0.js";const se={class:"competition-rules-container"},ie={key:0,class:"competition-rules-steps"},re={class:"competition-rules-content"},ce={key:4,class:"footer-container"},ve=ee({__name:"index",emits:["nextStep","backStep"],setup(de,{emit:R}){const h=a(()=>e.value==="create_module"&&i.value==1),C=a(()=>e.value==="create_module"&&i.value==2),F=a(()=>e.value==="info_add"),g=a(()=>e.value==="word_finish"||e.value==="word_not_edit");let{handleImportWord:k,files:x,loading:me,htmlContent:c}=G();const _=l(!1);te(()=>c.value,o=>{e.value,o&&_.value&&e.value==="create_module"&&(v.value=c.value,e.value="word_not_edit",_.value=!1,c.value=null,x.value=null)});const B=async()=>{_.value=!0,await k(),c.value},D=()=>{i.value=1,e.value="create_module",y()},N=oe("pageType"),J=a(()=>N!=="detail"&&(h.value||g.value)),A=Z(),u=l(null),i=l(1),v=l(null),b=l(null),e=l("create_module"),r=a(()=>A.query.id),S=l([]),H=a(()=>e.value==="create_module"&&i.value==2||e.value==="info_add");let M={create_module:0,info_add:2,word_not_edit:3,word_finish:3};const T=a(()=>M[e.value]);ne(()=>{if(u.value){v.value=u.value.eventRegulationContent,b.value=u.value.eventRegulationFieldJson,e.value=u.value.eventRegulationStatus;try{S.value=JSON.parse(u.value.eventRegulationFieldJson)}catch{}}});const y=async()=>{let o=await Y(r.value);o.code===0&&(o.data.eventRegulationStatus||(o.data.eventRegulationStatus="create_module"),u.value=o.data)},V=()=>{i.value=2},W=()=>{e.value="info_add"};ae(()=>{y()});const O=()=>{e.value="create_module",i.value=2},P=o=>{e.value="word_finish",v.value=o},j=R,q=()=>{j("backStep")};return(o,w)=>{const I=p("el-step"),z=p("el-steps"),L=p("el-button");return s(),f("div",se,[t(H)?(s(),f("div",ie,[d(z,{style:{"max-width":"400px"},active:t(T),"finish-status":"success","align-center":""},{default:E(()=>[d(I,{title:"\u9009\u62E9\u8D5B\u7A0B\u4FE1\u606F"}),d(I,{title:"\u4FE1\u606F\u5F55\u5165"})]),_:1},8,["active"])])):n("v-if",!0),ue("div",re,[n(" {{ showScheduleInformation }} "),n(" \u9ED8\u8BA4\u72B6\u6001 "),t(h)?(s(),m(Q,{key:0,onImport:B,onCreate:V,"event-id":t(r)},null,8,["event-id"])):n("v-if",!0),n(" \u4FE1\u606F\u5F55\u5165 "),t(C)?(s(),m(X,{key:1,"event-id":t(r),list:t(S),onNext:W},null,8,["event-id","list"])):n("v-if",!0),n(" \u6587\u6863\u672A\u7F16\u8F91 "),t(F)?(s(),m(K,{key:2,"event-id":t(r),onPrevious:O,onSave:P},null,8,["event-id"])):n("v-if",!0),n(" \u6587\u6863\u5B8C\u6210 "),t(g)?(s(),m(U,{key:3,onInitImport:D,"event-id":t(r),content:t(v),isEventRegulation:t(u).isEventRegulation},null,8,["event-id","content","isEventRegulation"])):n("v-if",!0),t(J)?(s(),f("div",ce,[d(L,{onClick:q},{default:E(()=>w[0]||(w[0]=[le("\u4E0A\u4E00\u6B65",-1)])),_:1,__:[0]})])):n("v-if",!0)])])}}});const ke=$(ve,[["__scopeId","data-v-a9d4979f"]]);export{ke as default};
