import{t as l,D as e,E as a,d as i,H as r,a as t,N as n,w as s,v as o,aq as c,ak as u,L as d,C as v}from"./index-fc0cdbb1.js";const[b,f]=l("cell"),g={tag:n("div"),icon:String,size:String,title:s,value:s,label:s,center:Boolean,isLink:Boolean,border:o,iconPrefix:String,valueClass:c,labelClass:c,titleClass:c,titleStyle:null,arrowDirection:String,required:{type:[Boolean,String],"default":null},clickable:{type:Boolean,"default":null}},p=v(i({name:b,props:e({},g,a),setup(l,{slots:e}){const a=r(),i=()=>{if(e.label||u(l.label))return t("div",{"class":[f("label"),l.labelClass]},[e.label?e.label():l.label])},n=()=>{var a;if(e.title||u(l.title)){const r=null==(a=e.title)?void 0:a.call(e);if(Array.isArray(r)&&0===r.length)return;return t("div",{"class":[f("title"),l.titleClass],style:l.titleStyle},[r||t("span",null,[l.title]),i()])}},s=()=>{const a=e.value||e["default"];if(a||u(l.value))return t("div",{"class":[f("value"),l.valueClass]},[a?a():t("span",null,[l.value])])},o=()=>{if(e["right-icon"])return e["right-icon"]();if(l.isLink){const e=l.arrowDirection&&"right"!==l.arrowDirection?"arrow-".concat(l.arrowDirection):"arrow";return t(d,{name:e,"class":f("right-icon")},null)}};return()=>{var i;const{tag:r,size:c,center:u,border:v,isLink:b,required:g}=l,p=null!=(i=l.clickable)?i:b,C={center:u,required:!!g,clickable:p,borderless:!v};return c&&(C[c]=!!c),t(r,{"class":f(C),role:p?"button":void 0,tabindex:p?0:void 0,onClick:a},{"default":()=>{var a;return[e.icon?e.icon():l.icon?t(d,{name:l.icon,"class":f("left-icon"),classPrefix:l.iconPrefix},null):void 0,n(),s(),o(),null==(a=e.extra)?void 0:a.call(e)]}})}}}));export{p as C,g as c};
