import{f as l,b as e,F as t,A as i}from"./index-9c365a03.js";import{c as r,a,n as s,t as n,l as o,h as c,r as u,j as d,v,I as b,w as f,M as g}from"./index.daaf9893.js";const[p,m]=r("cell"),x={tag:a("div"),icon:String,size:String,title:s,value:s,label:s,center:Boolean,isLink:Boolean,border:n,required:Boolean,iconPrefix:String,valueClass:o,labelClass:o,titleClass:o,titleStyle:null,arrowDirection:String,clickable:{type:Boolean,default:null}};const C=f(l({name:p,props:c({},x,u),setup(l,{slots:t}){const i=d(),r=()=>{if(t.label||v(l.label))return e("div",{class:[m("label"),l.labelClass]},[t.label?t.label():l.label])},a=()=>{var i;if(t.title||v(l.title)){const a=null==(i=t.title)?void 0:i.call(t);if(Array.isArray(a)&&0===a.length)return;return e("div",{class:[m("title"),l.titleClass],style:l.titleStyle},[a||e("span",null,[l.title]),r()])}},s=()=>{const i=t.value||t.default;if(i||v(l.value))return e("div",{class:[m("value"),l.valueClass]},[i?i():e("span",null,[l.value])])},n=()=>{if(t["right-icon"])return t["right-icon"]();if(l.isLink){const t=l.arrowDirection&&"right"!==l.arrowDirection?`arrow-${l.arrowDirection}`:"arrow";return e(b,{name:t,class:m("right-icon")},null)}};return()=>{var r;const{tag:o,size:c,center:u,border:d,isLink:v,required:f}=l,g=null!=(r=l.clickable)?r:v,p={center:u,required:f,clickable:g,borderless:!d};return c&&(p[c]=!!c),e(o,{class:m(p),role:g?"button":void 0,tabindex:g?0:void 0,onClick:i},{default:()=>{var i;return[t.icon?t.icon():l.icon?e(b,{name:l.icon,class:m("left-icon"),classPrefix:l.iconPrefix},null):void 0,a(),s(),n(),null==(i=t.extra)?void 0:i.call(t)]}})}}})),[h,k]=r("cell-group");const w=f(l({name:h,inheritAttrs:!1,props:{title:String,inset:Boolean,border:n},setup(l,{slots:r,attrs:a}){const s=()=>{var t;return e("div",i({class:[k({inset:l.inset}),{[g]:l.border&&!l.inset}]},a),[null==(t=r.default)?void 0:t.call(r)])};return()=>l.title||r.title?e(t,null,[e("div",{class:k("title",{inset:l.inset})},[r.title?r.title():l.title]),s()]):s()}}));export{w as C,C as a,x as c};
