import{l as k}from"./freeTableTracks-CfeiVurn.js";import{g as T}from"./freeTableGrid-BXWKfNhh.js";function z(r){const t=r==null?void 0:r.outerBorder;return{top:(t==null?void 0:t.top)!==!1,right:(t==null?void 0:t.right)!==!1,bottom:(t==null?void 0:t.bottom)!==!1,left:(t==null?void 0:t.left)!==!1}}function h(r){const t=r==null?void 0:r.innerBorder;return{horizontal:(t==null?void 0:t.horizontal)!==!1,vertical:(t==null?void 0:t.vertical)!==!1}}function E(r,t,e,i,f,d,b,u,B){const a=z(r),$=h(r),x=i+d-1,F=f+b-1;let g=i===0?a.top:$.horizontal,p=F===B-1?a.right:$.vertical,m=x===u-1?a.bottom:$.horizontal,v=f===0?a.left:$.vertical;if((e==null?void 0:e.hideBorderTop)===!0&&(g=!1),(e==null?void 0:e.hideBorderRight)===!0&&(p=!1),(e==null?void 0:e.hideBorderBottom)===!0&&(m=!1),(e==null?void 0:e.hideBorderLeft)===!0&&(v=!1),g&&i>0)for(let s=f;s<=f+b-1;s+=1){const o=T(t,i-1,s);if((o==null?void 0:o.hideBorderBottom)===!0){g=!1;break}}if(m&&x0)for(let s=i;s<=i+d-1;s+=1){const o=T(t,s,f-1);if((o==null?void 0:o.hideBorderRight)===!0){v=!1;break}}if(p&&Fi?k(i[a]):"solid",d=r.top?`${t}px ${f("top")} ${e}`:"none",b=r.right?`${t}px ${f("right")} ${e}`:"none",u=r.bottom?`${t}px ${f("bottom")} ${e}`:"none",B=r.left?`${t}px ${f("left")} ${e}`:"none";return`border-top:${d};border-right:${b};border-bottom:${u};border-left:${B};`}export{L as b,E as r};