import{__exports as n}from"../../../../_virtual/makeTableConfig.mjs";import{__require as e}from"./calculateMaximumColumnWidths.mjs";import{__require as i}from"./spanningCellManager.mjs";import{__require as a}from"./utils.mjs";import{__require as r}from"./validateConfig.mjs";import{__require as l}from"./validateSpanningCellConfig.mjs";var o;function t(){if(o)return n;o=1,Object.defineProperty(n,"__esModule",{value:!0}),n.makeTableConfig=void 0;const t=e(),m=i(),s=a(),u=r(),d=l();return n.makeTableConfig=(n,e={},i)=>{var a,r,l,o,g;(0,u.validateConfig)("config.json",e),(0,d.validateSpanningCellConfig)(n,null!==(a=e.spanningCells)&&void 0!==a?a:[]);const f=null!==(r=null!=i?i:e.spanningCells)&&void 0!==r?r:[],p=((n,e,i,a)=>{const r=(0,t.calculateMaximumColumnWidths)(n,a);return n[0].map((n,a)=>({alignment:"left",paddingLeft:1,paddingRight:1,truncate:Number.POSITIVE_INFINITY,verticalAlignment:"top",width:r[a],wrapWord:!1,...i,...null==e?void 0:e[a]}))})(n,e.columns,e.columnDefault,f),c=null!==(l=e.drawVerticalLine)&&void 0!==l?l:()=>!0,C=null!==(o=e.drawHorizontalLine)&&void 0!==o?o:()=>!0;return{...e,border:(0,s.makeBorderConfig)(e.border),columns:p,drawHorizontalLine:C,drawVerticalLine:c,singleLine:null!==(g=e.singleLine)&&void 0!==g&&g,spanningCellManager:(0,m.createSpanningCellManager)({columnsConfig:p,drawHorizontalLine:C,drawVerticalLine:c,rows:n,spanningCellConfigs:f})}},n}export{t as __require};