import{u as E,a as k,_ as B}from"./index-f6f689f9-1782572373740v=1.0.0.js";import I from"./CommonTitle-68f5af31-1782572373740v=1.0.0.js";import{c as T}from"./eventGroupAndTermApi-31c30359-1782572373740v=1.0.0.js";import{m as S}from"./mittBus-95140f7c-1782572373740v=1.0.0.js";import{y as A,i as p,c as D,r as m,m as G,al as w,z as o,A as a,R as x,u as _,B as c,Q as v,a4 as L,D as V,P as q,M as s,I as z}from"./vendor-866bb149-1782572373740v=1.0.0.js";import"./eleVendor-48a7d3b8-1782572373740v=1.0.0.js";const F={class:"signup-type-container"},N={class:"type-list"},R=["onClick"],M={class:"name"},b={class:"actions"},j=A({__name:"SignupTypeCategory",emits:["change"],setup(O,{emit:P}){const y=p("pageType"),r=D(()=>y!=="detail"),g=E(),u=k(),t=m([]),l=m(""),d=e=>{l.value=e.eventGroupId,S.emit("EventAddSignupTypeCategoryChangeEventGroupInfo",e)},i=p("eventTypeId"),h=()=>{g.push({name:"eventListSignupSet",query:{activeTab:"signupSetting",type:"multiple",eventId:u.query.id,eventTypeId:i==null?void 0:i.value}})},f=async()=>{let e=await T({eventId:u.query.id});e.code===0&&(t.value=e.data.listData,t.value.length>0&&d(t.value[0]))};return G(()=>{f()}),(e,Q)=>{const C=w("el-empty");return o(),a("div",F,[x(I,{title:"\u8D5B\u4E8B\u7EC4\u522B",onAdd:h,addText:"\u6279\u91CF\u8BBE\u7F6E",showAdd:_(r)},null,8,["showAdd"]),c("div",N,[(o(!0),a(v,null,L(t.value,n=>(o(),a("div",{key:n.eventGroupId,class:V(["category-item",{active:l.value===n.eventGroupId}]),onClick:$=>d(n)},[c("span",M,q(n.name),1),c("div",b,[n.eventGroupId&&_(r)?(o(),a(v,{key:0},[s(` <el-icon @click="handleEdit(item)"><Edit /></el-icon>\r
						<el-icon @click="handleCopy(item)"><CopyDocument /></el-icon>\r
						<el-icon @click="handleDelete(item)"><Delete /></el-icon> `)],64)):s("v-if",!0),s(' <el-icon v-else @click="handleEdit(item, true)"><View /></el-icon> ')])],10,R))),128)),t.value.length===0?(o(),z(C,{key:0,"image-size":70,description:"\u6682\u65E0\u6570\u636E"})):s("v-if",!0)])])}}});const Y=B(j,[["__scopeId","data-v-335c9227"]]);export{Y as default};
