import{n as w,H as T,t as s,q as t,F as m,G as c,v as a,x as _,ap as k,A as p,y as u,p as f,r as S,D as C,I as L,_ as A}from"./C-p8iwFB.js";import{E as B}from"./0J232JST.js";const I={class:"bg-grey-50"},x={key:0},E={key:0},R=["onClick"],N={class:"text-body-small-grey text-link"},V=w({__name:"AtomTable",props:{tables:{},maxItemsToShow:{},initialRowsLength:{}},setup(z,{emit:y}){const b=y,l=T({}),h=e=>`${100/e}%`,g=e=>{l.value[e]=!0,l.value[e]&&b(B.SHOW_ALL_RESULTS,e)};return(e,F)=>(t(),s("div",null,[(t(!0),s(m,null,c(e.tables,(n,r)=>(t(),s("div",{key:r,class:"table-container"},[a("table",{class:p({"mb-16":e.initialRowsLength>(e.maxItemsToShow||10)&&!l.value[r]})},[a("thead",null,[a("tr",I,[(t(!0),s(m,null,c(n.headers,(o,d)=>(t(),s("th",{key:d,style:k({width:h(n.headers.length)}),valign:"top"},[a("p",{class:p({"border-bottom":o.description})},u(o.title),3),o.description?(t(),s("p",x,u(o.description),1)):_("",!0)],4))),128))])]),a("tbody",null,[(t(!0),s(m,null,c(l.value[r]?n.rows:n.rows.slice(0,e.maxItemsToShow||10),(o,d)=>(t(),s("tr",{key:d},[(t(!0),s(m,null,c(o.values,(i,v)=>(t(),s("td",{key:v,class:p({"text-title-menu":i.bold}),style:k({width:h(n.headers.length)})},[i.isButton?(t(),f(L,{key:1,outline:"",small:"",link:i.link},{default:S(()=>[C(u(i.text),1)]),_:2},1032,["link"])):(t(),s("p",E,u(i.text),1))],6))),128))]))),128))])],2),e.initialRowsLength>(e.maxItemsToShow||10)&&!l.value[r]?(t(),s("button",{key:0,class:"table-button",onClick:o=>g(r)},[a("span",N,u(n.buttonText),1)],8,R)):_("",!0)]))),128))]))}}),$=A(V,[["__scopeId","data-v-ee5a4fd1"]]);export{$ as A}; //# sourceMappingURL=DrLqx0Uk.js.map