import{u as x,r as L}from"./use-route-ooe9RtXE.js";import{bt as o,by as D,bn as u,bm as q,b7 as B,am as I,bk as V,N as n,bz as s,bo as f,aq as _}from"./index-xnhGKCfe.js";const[z,r]=V("cell"),N={tag:q("div"),icon:String,size:String,title:u,value:u,label:u,center:Boolean,isLink:Boolean,border:D,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({},N,L);var R=B({name:z,props:A,setup(e,{slots:l}){const v=x(),m=()=>{if(l.label||s(e.label))return n("div",{class:[r("label"),e.labelClass]},[l.label?l.label():e.label])},g=()=>{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:[r("title"),e.titleClass],style:e.titleStyle},[t||n("span",null,[e.title]),m()])}},h=()=>{const a=l.value||l.default;if(a||s(e.value))return n("div",{class:[r("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:r("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:r("right-icon")},null)}};return()=>{var a;const{tag:t,size:i,center:C,border:P,isLink:S,required:y}=e,c=(a=e.clickable)!=null?a:S,d={center:C,required:!!y,clickable:c,borderless:!P};return i&&(d[i]=!!i),n(t,{class:r(d),role:c?"button":void 0,tabindex:c?0:void 0,onClick:v},{default:()=>{var b;return[k(),g(),h(),w(),(b=l.extra)==null?void 0:b.call(l)]}})}}});const j=_(R);export{j as C,N as c};
