import{E as v,H as f,G as m,ab as G,d as P,aj as O,i,a2 as b,b4 as _,O as p,J as $,K as q,at as E,L as T,W as x,b5 as z,a8 as D,aw as V,N as j}from"./index.7994470a.js";const[S,w]=v("grid"),K={square:Boolean,center:f,border:f,gutter:m,reverse:Boolean,iconSize:m,direction:String,clickable:Boolean,columnNum:G(4)},h=Symbol(S);var L=P({name:S,props:K,setup(e,{slots:t}){const{linkChildren:a}=O(h);return a({props:e}),()=>{var c;return i("div",{style:{paddingLeft:b(e.gutter)},class:[w(),{[_]:e.border&&!e.gutter}]},[(c=t.default)==null?void 0:c.call(t)])}}});const Y=p(L),[H,l]=v("grid-item"),J=$({},q,{dot:Boolean,text:String,icon:String,badge:m,iconColor:String,iconPrefix:String,badgeProps:Object});var U=P({name:H,props:J,setup(e,{slots:t}){const{parent:a,index:c}=E(h),B=T();if(!a)return;const y=x(()=>{const{square:s,gutter:n,columnNum:r}=a.props,d=`${100/+r}%`,o={flexBasis:d};if(s)o.paddingTop=d;else if(n){const u=b(n);o.paddingRight=u,c.value>=r&&(o.marginTop=u)}return o}),C=x(()=>{const{square:s,gutter:n}=a.props;if(s&&n){const r=b(n);return{right:r,bottom:r,height:"auto"}}}),R=()=>{if(t.icon)return i(V,D({dot:e.dot,content:e.badge},e.badgeProps),{default:t.icon});if(e.icon)return i(j,{dot:e.dot,name:e.icon,size:a.props.iconSize,badge:e.badge,class:l("icon"),color:e.iconColor,badgeProps:e.badgeProps,classPrefix:e.iconPrefix},null)},I=()=>{if(t.text)return t.text();if(e.text)return i("span",{class:l("text")},[e.text])},N=()=>t.default?t.default():[R(),I()];return()=>{const{center:s,border:n,square:r,gutter:d,reverse:o,direction:u,clickable:g}=a.props,k=[l("content",[u,{center:s,square:r,reverse:o,clickable:g,surround:n&&d}]),{[z]:n}];return i("div",{class:[l({square:r})],style:y.value},[i("div",{role:g?"button":void 0,class:k,style:C.value,tabindex:g?0:void 0,onClick:B},[N()])])}}});const A=p(U);export{Y as G,A as a};