import{c as L,a9 as y,as as D,d as I,at as B,a as n,m as V,n as o,t as _,a3 as s,W as u,I as f,k as q}from"./index-29f55498.js";const[z,i]=L("cell"),A={tag:V("div"),icon:String,size:String,title:o,value:o,label:o,center:Boolean,isLink:Boolean,border:_,required:Boolean,iconPrefix:String,valueClass:s,labelClass:s,titleClass:s,titleStyle:null,arrowDirection:String,clickable:{type:Boolean,default:null}},N=y({},A,D);var R=I({name:z,props:N,setup(e,{slots:a}){const v=B(),g=()=>{if(a.label||u(e.label))return n("div",{class:[i("label"),e.labelClass]},[a.label?a.label():e.label])},h=()=>{var l;if(a.title||u(e.title)){const t=(l=a.title)==null?void 0:l.call(a);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 l=a.value||a.default;if(l||u(e.value))return n("div",{class:[i("value"),e.valueClass]},[l?l():n("span",null,[e.value])])},k=()=>{if(a.icon)return a.icon();if(e.icon)return n(f,{name:e.icon,class:i("left-icon"),classPrefix:e.iconPrefix},null)},w=()=>{if(a["right-icon"])return a["right-icon"]();if(e.isLink){const l=e.arrowDirection&&e.arrowDirection!=="right"?`arrow-${e.arrowDirection}`:"arrow";return n(f,{name:l,class:i("right-icon")},null)}};return()=>{var l;const{tag:t,size:r,center:C,border:P,isLink:S,required:x}=e,c=(l=e.clickable)!=null?l:S,d={center:C,required:x,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=a.extra)==null?void 0:b.call(a)]}})}}});const W=q(R);export{W as C,A as c};
