import{n as c}from"./index.8c202964.js";const a={name:"ConditionList",props:{conditionOptions:Array},data(){return{toggleList:[],itemHeight:48}},computed:{renderConditionOptions(){return this.conditionOptions.filter(t=>t.children&&t.children.length)}},watch:{conditionOptions:{immediate:!0,handler(t){t.length&&t.forEach(()=>{this.toggleList.push(!1)})}}},methods:{handleConditionClick(t,e){const i=t.selected;e.forEach(s=>s.selected=!1),t.selected=!i,this.$emit("change",this.conditionOptions)},toggleMenu(t){this.$set(this.toggleList,t,!this.toggleList[t])}}};var r=function(){var e=this,i=e._self._c;return i("div",{staticClass:"condition-list"},e._l(e.renderConditionOptions,function(s,l){return i("div",{key:l,staticClass:"menuTypeList",style:{height:e.toggleList[l]?`${e.itemHeight}px`:"330px"}},[i("div",{staticClass:"menuTypeTitle text-left flex flex-space-between"},[i("p",[e._v(e._s(s.classificationName))]),i("i",{staticClass:"toggleMenuIcon",class:e.toggleList[l]?"el-icon-arrow-down":"el-icon-arrow-up",on:{click:function(n){return e.toggleMenu(l)}}})]),e.toggleList[l]?e._e():i("div",{staticClass:"menuTypeListUl scrollbar-default"},e._l(s.children,function(n,o){return i("div",{key:o,staticClass:"menuTypeListItem flex flex-space-between flex-center-align",class:{active:n.selected},on:{click:function(u){return e.handleConditionClick(n,s.children)}}},[i("p",{directives:[{name:"title",rawName:"v-title.overflow",value:n.classificationName,expression:"option.classificationName",modifiers:{overflow:!0}}],staticClass:"label flex-none text-ellipsis",attrs:{"title-placement":"right"}},[e._v(" "+e._s(n.classificationName)+" ")]),i("p",[e._v("("+e._s(n.contentNum)+")")])])}),0)])}),0)},d=[],f=c(a,r,d,!1,null,"42bd28e3",null,null);const g=f.exports;export{g as C};
