import{ak as o,N as y,S as u,O as L,Q as D,W as I,bE as B,M as V,bD as _,f as n,aG as s,I as f,X as q}from"./index-BV0H45HW.js";const[N,i]=D("cell"),z={tag:L("div"),icon:String,size:String,title:u,value:u,label:u,center:Boolean,isLink:Boolean,border:y,iconPrefix:String,valueClass:o,labelClass:o,titleClass:o,titleStyle:null,arrowDirection:String,required:{type:[Boolean,String],default:null},clickable:{type:Boolean,default:null}},A=I({},z,B);var R=V({name:N,props:A,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])])},S=()=>{if(l.icon)return l.icon();if(e.icon)return n(f,{name:e.icon,class:i("left-icon"),classPrefix:e.iconPrefix},null)},k=()=>{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:w,border:C,isLink:P,required:x}=e,c=(a=e.clickable)!=null?a:P,d={center:w,required:!!x,clickable:c,borderless:!C};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[S(),h(),m(),k(),(b=l.extra)==null?void 0:b.call(l)]}})}}});const G=q(R);export{G as C,z as c};
