import{d as h,j as d,c as t,l as s,F as c,m,u as i,t as f,o as r}from"./iconify-ifN16AHJ.js";import{_ as D}from"./_plugin-vue_export-helper-DlAUqK2U.js";const g={class:"preview-table bg-black/70 text-white/70 border-gray-300"},v=h({__name:"PreviewTable",props:{tableData:{default:()=>[]},columnNumber:{default:3},rowNumber:{default:2}},setup(p){const a=p,N=d(()=>{if(a.tableData.length){const l=a.tableData[0].map((e,o)=>e||`$col${o}`);return a.tableData.slice(1).map((e,o)=>{const n={};return e.forEach((w,_)=>{n[l[_]]=w}),n})}else return[]}),b=d(()=>a.tableData.length?a.tableData[0].map((u,e)=>u||`$col${e}`):[]);return(l,u)=>(r(),t("div",g,[s("table",null,[s("thead",null,[s("tr",null,[(r(!0),t(c,null,m(i(b).slice(0,l.columnNumber),e=>(r(),t("th",{key:e},f(/\$col/.test(e)?"":e),1))),128))])]),s("tbody",null,[(r(!0),t(c,null,m(i(N).slice(0,l.rowNumber),(e,o)=>(r(),t("tr",{key:o},[(r(!0),t(c,null,m(i(b).slice(0,l.columnNumber),n=>(r(),t("td",{key:n},f(e[n]),1))),128))]))),128)),s("tr",null,[(r(!0),t(c,null,m(i(b).slice(0,l.columnNumber),e=>(r(),t("td",{key:e}," ... "))),128))])])])]))}}),T=D(v,[["__scopeId","data-v-5c6ac4f8"]]);export{T as default};
