import{_ as t}from"./u-button.Chh1-6a-.js";import{X as n,o as e,t as o,p as a,w as i,B as s,D as l,F as d,v as u,R as r,x as c,E as h,q as p,H as m,Q as y,y as g}from"./index-P0fyQ2Em.js";import{r as f}from"./uni-app.es.DOtS5Ldl.js";import{_ as b}from"./u-action-sheet.C0QG6n24.js";import{C as B}from"./index.BoqsLhBg.js";import{_ as L}from"./_plugin-vue_export-helper.BCo6x5W8.js";const v=L({components:{CustomButton:B},props:{actionList:{type:Array,default:()=>[]},rightBtnList:{type:Array,default:()=>[]},todoBtnList:{type:Array,default:()=>[]},btnInfo:{type:Object,default:()=>({})},opType:{type:[String,Number],default:""},saveBtnText:{type:String,default:""},btnLoading:{type:Boolean,default:!1},hideSaveBtn:{type:Boolean,default:!1},hasSignFor:{type:Boolean,default:!1},hasComment:{type:Boolean,default:!1},isProcessing:{type:[String,Number],default:""}},computed:{loading(){return this.btnLoading},showMoreBtn(){return!!this.actionList.length},showRejectBtn(){var t;return!(!(null==(t=this.btnInfo)?void 0:t.hasRejectBtn)||this.isProcessing||2==this.opType)},showSaveBtn(){var t;return!(!(null==(t=this.btnInfo)?void 0:t.hasSaveBtn)||this.hideSaveBtn)}},data:()=>({showAction:!1}),methods:{handleBtn(t,n){this.loading||this.$emit("handleBtn",t,n)},handleAction(t){this.handleBtn(this.actionList[t].id,this.actionList[t])}}},[["render",function(B,L,v,k,x,w){const T=n("CustomButton"),j=f(e("u-button"),t),C=p,_=f(e("u-action-sheet"),b);return v.hasComment||v.actionList.length||v.rightBtnList.length?(o(),a(C,{key:0,class:"flowBefore-actions",style:{height:"88rpx"}},{default:i((()=>[w.showMoreBtn?(o(),a(T,{key:0,btnText:"更多",btnType:"more",iconName:"more-dot-fill",size:"28",onHandleBtn:L[0]||(L[0]=t=>x.showAction=t),btnLoading:w.loading,class:"u-flex-col buttom-btn-left-inner"},null,8,["btnLoading"])):s("",!0),2!=v.opType?(o(),l(d,{key:1},[w.showSaveBtn?(o(),a(T,{key:0,btnText:v.saveBtnText||"暂存",customIcon:"",class:"u-flex-col buttom-btn-left-inner",btnIcon:"icon-ym icon-ym-extend-save",size:"28",onHandleBtn:L[1]||(L[1]=t=>w.handleBtn("save")),btnType:"save",btnLoading:w.loading},null,8,["btnText","btnLoading"])):s("",!0),w.showRejectBtn?(o(),a(T,{key:1,btnText:"拒绝",iconName:"minus-circle",size:"28",onHandleBtn:L[2]||(L[2]=t=>w.handleBtn("reject")),btnType:"reject",btnLoading:w.loading,class:"u-flex-col buttom-btn-left-inner"},null,8,["btnLoading"])):s("",!0)],64)):s("",!0),u(C,{class:"rightBtn u-flex"},{default:i((()=>[v.rightBtnList.length?s("",!0):(o(),a(j,{key:0,class:"buttom-btn",onClick:L[3]||(L[3]=r((t=>w.handleBtn("comment")),["stop"])),loading:w.loading},{default:i((()=>[c(" 评论 ")])),_:1},8,["loading"])),2!=v.opType?(o(!0),l(d,{key:1},h(v.rightBtnList,((t,n)=>(o(),a(j,{key:n,class:m(["buttom-btn",{"delegate-submit-btn":"delegateSubmit"===t.id}]),onClick:r((n=>w.handleBtn(t.id)),["stop"]),style:y({width:t.width}),loading:w.loading,type:null==t?void 0:t.type},{default:i((()=>[c(g(t.fullName),1)])),_:2},1032,["onClick","style","class","loading","type"])))),128)):(o(!0),l(d,{key:2},h(v.todoBtnList,((t,n)=>(o(),a(j,{key:n,class:"buttom-btn",onClick:r((n=>w.handleBtn(t.id)),["stop"]),style:y({width:t.width}),loading:w.loading,type:null==t?void 0:t.type},{default:i((()=>[c(g(t.fullName),1)])),_:2},1032,["onClick","style","loading","type"])))),128))])),_:1}),u(_,{modelValue:x.showAction,"onUpdate:modelValue":L[4]||(L[4]=t=>x.showAction=t),list:v.actionList,onClick:w.handleAction},null,8,["modelValue","list","onClick"])])),_:1})):s("",!0)}],["__scopeId","data-v-e9980d17"]]);export{v as f};