import{x as v,z as b,y as m,a6 as N,d as P,ae as _,i,Y as f,b2 as $,K as p,E as q,G as z,ao as E,H as O,Q as x,b3 as T,a3 as D,ar as V,J as K}from"./index.afa1b71c.js";const[S,Y]=v("grid"),j={square:Boolean,center:b,border:b,gutter:m,reverse:Boolean,iconSize:m,direction:String,clickable:Boolean,columnNum:N(4)},h=Symbol(S);var w=P({name:S,props:j,setup(e,{slots:t}){const{linkChildren:a}=_(h);return a({props:e}),()=>{var c;return i("div",{style:{paddingLeft:f(e.gutter)},class:[Y(),{[$]:e.border&&!e.gutter}]},[(c=t.default)==null?void 0:c.call(t)])}}});const U=p(w),[H,l]=v("grid-item"),J=q({},z,{dot:Boolean,text:String,icon:String,badge:m,iconColor:String,iconPrefix:String,badgeProps:Object});var L=P({name:H,props:J,setup(e,{slots:t}){const{parent:a,index:c}=E(h),y=O();if(!a)return;const B=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=f(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=f(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(K,{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])},k=()=>t.default?t.default():[R(),I()];return()=>{const{center:s,border:n,square:r,gutter:d,reverse:o,direction:u,clickable:g}=a.props,G=[l("content",[u,{center:s,square:r,reverse:o,clickable:g,surround:n&&d}]),{[T]:n}];return i("div",{class:[l({square:r})],style:B.value},[i("div",{role:g?"button":void 0,class:G,style:C.value,tabindex:g?0:void 0,onClick:y},[k()])])}}});const A=p(L);export{U as G,A as a};
