import{ak as o,M as x,R as u,N as y,O as D,V as I,bE as V,L as B,bD as _,e as n,aG as s,I as f,W as q}from"./index-BDh_pN-M.js";const[N,i]=D("cell"),R={tag:y("div"),icon:String,size:String,title:u,value:u,label:u,center:Boolean,isLink:Boolean,border:x,iconPrefix:String,valueClass:o,labelClass:o,titleClass:o,titleStyle:null,arrowDirection:String,required:{type:[Boolean,String],default:null},clickable:{type:Boolean,default:null}},z=I({},R,V);var A=B({name:N,props:z,setup(e,{slots:l}){const v=_(),g=()=>{if(l.label||s(e.label))return n("div",{class:[i("label"),e.labelClass]},[l.label?l.label():e.label])},h=()=>{var a;if(l.title||s(e.title)){const t=(a=l.title)==null?void 0:a.call(l);return Array.isArray(t)&&t.length===0?void 0:n("div",{class:[i("title"),e.titleClass],style:e.titleStyle},[t||n("span",null,[e.title]),g()])}},m=()=>{const a=l.value||l.default;if(a||s(e.value))return n("div",{class:[i("value"),e.valueClass]},[a?a():n("span",null,[e.value])])},k=()=>{if(l.icon)return l.icon();if(e.icon)return n(f,{name:e.icon,class:i("left-icon"),classPrefix:e.iconPrefix},null)},w=()=>{if(l["right-icon"])return l["right-icon"]();if(e.isLink){const a=e.arrowDirection&&e.arrowDirection!=="right"?`arrow-${e.arrowDirection}`:"arrow";return n(f,{name:a,class:i("right-icon")},null)}};return()=>{var a;const{tag:t,size:r,center:C,border:P,isLink:S,required:L}=e,c=(a=e.clickable)!=null?a:S,d={center:C,required:!!L,clickable:c,borderless:!P};return r&&(d[r]=!!r),n(t,{class:i(d),role:c?"button":void 0,tabindex:c?0:void 0,onClick:v},{default:()=>{var b;return[k(),h(),m(),w(),(b=l.extra)==null?void 0:b.call(l)]}})}}});const G=q(A);export{G as C,R as c};
