import{_ as e}from"./u-icon.CLOPtL2B.js";import{q as t,o as l,c as a,w as o,a2 as r,t as s,R as i,C as u,F as c,v as d,x as n,A as y,G as p,i as f}from"./index-DL8B2Mxu.js";import{r as b}from"./uni-app.es.BSVEa1f2.js";import{_ as m}from"./_plugin-vue_export-helper.BCo6x5W8.js";const _=m({name:"u-cell-item",emits:["click"],props:{icon:{type:String,default:""},title:{type:[String,Number],default:""},value:{type:[String,Number],default:""},label:{type:[String,Number],default:""},borderBottom:{type:Boolean,default:!0},borderTop:{type:Boolean,default:!1},hoverClass:{type:String,default:"u-cell-hover"},arrow:{type:Boolean,default:!0},center:{type:Boolean,default:!1},required:{type:Boolean,default:!1},titleWidth:{type:[Number,String],default:""},arrowDirection:{type:String,default:"right"},titleStyle:{type:Object,default:()=>({})},valueStyle:{type:Object,default:()=>({})},labelStyle:{type:Object,default:()=>({})},bgColor:{type:String,default:"transparent"},index:{type:[String,Number],default:""},useLabelSlot:{type:Boolean,default:!1},iconSize:{type:[Number,String],default:34},iconStyle:{type:Object,default:()=>({})}},data:()=>({}),computed:{arrowStyle(){let e={};return"up"==this.arrowDirection?e.transform="rotate(-90deg)":"down"==this.arrowDirection?e.transform="rotate(90deg)":e.transform="rotate(0deg)",e}},methods:{click(){this.$emit("click",this.index)}}},[["render",function(m,_,S,g,h,v){const k=b(t("u-icon"),e),w=f;return l(),a(w,{onClick:v.click,class:p(["u-cell",{"u-border-bottom":S.borderBottom,"u-border-top":S.borderTop,"u-col-center":S.center,"u-cell--required":S.required}]),"hover-stay-time":"150","hover-class":S.hoverClass,style:i({backgroundColor:S.bgColor})},{default:o((()=>[S.icon?(l(),a(k,{key:0,size:S.iconSize,name:S.icon,"custom-style":S.iconStyle,class:"u-cell__left-icon-wrap"},null,8,["size","name","custom-style"])):(l(),a(w,{key:1,class:"u-flex"},{default:o((()=>[r(m.$slots,"icon",{},void 0,!0)])),_:3})),s(w,{class:"u-cell_title",style:i([{width:S.titleWidth?S.titleWidth+"rpx":"auto"},S.titleStyle])},{default:o((()=>[""!==S.title?(l(),u(c,{key:0},[d(n(S.title),1)],64)):r(m.$slots,"title",{key:1},void 0,!0),S.label||m.$slots.label?(l(),a(w,{key:2,class:"u-cell__label",style:i([S.labelStyle])},{default:o((()=>[""!==S.label?(l(),u(c,{key:0},[d(n(S.label),1)],64)):r(m.$slots,"label",{key:1},void 0,!0)])),_:3},8,["style"])):y("",!0)])),_:3},8,["style"]),s(w,{class:"u-cell__value",style:i([S.valueStyle])},{default:o((()=>[""!==S.value?(l(),u(c,{key:0},[d(n(S.value),1)],64)):r(m.$slots,"default",{key:1},void 0,!0)])),_:3},8,["style"]),m.$slots["right-icon"]?(l(),a(w,{key:2,class:"u-flex u-cell_right"},{default:o((()=>[r(m.$slots,"right-icon",{},void 0,!0)])),_:3})):y("",!0),S.arrow?(l(),a(k,{key:3,name:"arrow-right",style:i([v.arrowStyle]),class:"u-icon-wrap u-cell__right-icon-wrap"},null,8,["style"])):y("",!0)])),_:3},8,["onClick","class","hover-class","style"])}],["__scopeId","data-v-051bca84"]]);const S=m({name:"u-cell-group",props:{title:{type:String,default:""},border:{type:Boolean,default:!0},titleStyle:{type:Object,default:()=>({})}},data:()=>({index:0})},[["render",function(e,t,u,c,b,m){const _=f;return l(),a(_,{class:"u-cell-box"},{default:o((()=>[u.title?(l(),a(_,{key:0,class:"u-cell-title",style:i([u.titleStyle])},{default:o((()=>[d(n(u.title),1)])),_:1},8,["style"])):y("",!0),s(_,{class:p(["u-cell-item-box",{"u-border-bottom u-border-top":u.border}])},{default:o((()=>[r(e.$slots,"default",{},void 0,!0)])),_:3},8,["class"])])),_:3})}],["__scopeId","data-v-0fd0bdb3"]]);export{_,S as a};
