import{q as e,o as t,c as l,w as s,R as o,t as a,v as i,x as u,A as p,C as n,F as r,D as c,a0 as d,G as m,H as h,i as f}from"./index-DL8B2Mxu.js";import{_ as b}from"./u-popup.0TcTDuv5.js";import{r as y}from"./uni-app.es.BSVEa1f2.js";import{_ as x}from"./_plugin-vue_export-helper.BCo6x5W8.js";const C=x({name:"u-action-sheet",emits:["update:modelValue","input","click","close"],props:{value:{type:Boolean,default:!1},modelValue:{type:Boolean,default:!1},maskCloseAble:{type:Boolean,default:!0},list:{type:Array,default:()=>[]},tips:{type:Object,default:()=>({text:"",color:"",fontSize:"26"})},cancelBtn:{type:Boolean,default:!0},safeAreaInsetBottom:{type:Boolean,default:!1},borderRadius:{type:[String,Number],default:0},zIndex:{type:[String,Number],default:0},cancelText:{type:String,default:"取消"},labelName:{type:String,default:"text"},blur:{type:[Number,String],default:0}},computed:{valueCom(){return this.modelValue},tipsStyle(){let e={};return this.tips.color&&(e.color=this.tips.color),this.tips.fontSize&&(e.fontSize=this.tips.fontSize+"rpx"),e},itemStyle(){return e=>{let t={};return this.list[e].color&&(t.color=this.list[e].color),this.list[e].fontSize&&(t.fontSize=this.list[e].fontSize+"rpx"),this.list[e].disabled&&(t.color="#c0c4cc"),t}},uZIndex(){return this.zIndex?this.zIndex:this.$u.zIndex.popup}},data:()=>({popupValue:!1}),watch:{valueCom(e,t){this.popupValue=e}},methods:{close(){this.popupClose(),this.$emit("close")},popupClose(){this.$emit("input",!1),this.$emit("update:modelValue",!1)},itemClick(e){this.list[e].disabled||(this.$emit("click",e),this.$emit("input",!1),this.$emit("update:modelValue",!1))}}},[["render",function(x,C,k,_,S,v){const z=h,B=f,V=y(e("u-popup"),b);return t(),l(V,{blur:k.blur,mode:"bottom","border-radius":k.borderRadius,popup:!1,modelValue:S.popupValue,"onUpdate:modelValue":C[2]||(C[2]=e=>S.popupValue=e),maskCloseAble:k.maskCloseAble,length:"auto",safeAreaInsetBottom:k.safeAreaInsetBottom,onClose:v.popupClose,"z-index":v.uZIndex},{default:s((()=>[k.tips.text?(t(),l(B,{key:0,class:"u-tips u-border-bottom",style:o([v.tipsStyle])},{default:s((()=>[a(z,null,{default:s((()=>[i(u(k.tips.text),1)])),_:1})])),_:1},8,["style"])):p("",!0),(t(!0),n(r,null,c(k.list,((e,n)=>(t(),l(B,{key:n,onTouchmove:C[0]||(C[0]=d((()=>{}),["stop","prevent"])),onClick:e=>v.itemClick(n),style:o([v.itemStyle(n)]),class:m(["u-action-sheet-item u-line-1",[n<k.list.length-1?"u-border-bottom":""]]),"hover-stay-time":150},{default:s((()=>[a(z,null,{default:s((()=>[i(u(e[k.labelName]),1)])),_:2},1024),e.subText?(t(),l(z,{key:0,class:"u-action-sheet-item__subtext u-line-1"},{default:s((()=>[i(u(e.subText),1)])),_:2},1024)):p("",!0)])),_:2},1032,["onClick","style","class"])))),128)),k.cancelBtn?(t(),l(B,{key:1,class:"u-gab"})):p("",!0),k.cancelBtn?(t(),l(B,{key:2,onTouchmove:C[1]||(C[1]=d((()=>{}),["stop","prevent"])),class:"u-actionsheet-cancel u-action-sheet-item","hover-class":"u-hover-class","hover-stay-time":150,onClick:v.close},{default:s((()=>[i(u(k.cancelText),1)])),_:1},8,["onClick"])):p("",!0)])),_:1},8,["blur","border-radius","modelValue","maskCloseAble","safeAreaInsetBottom","onClose","z-index"])}],["__scopeId","data-v-eedc674a"]]);export{C as _};
